Merge branch 'main' of https://git.zenny.quest/zenayi/GameJamDungeon
This commit is contained in:
@@ -5,7 +5,7 @@ uniform sampler2D SCREEN_TEXTURE : hint_screen_texture, filter_linear_mipmap;
|
||||
|
||||
|
||||
uniform vec3 colorCount = vec3(32); //Max HSV Count
|
||||
uniform vec3 colorShift = vec3(1.0); //Shift HSV colors
|
||||
uniform vec3 colorShift = vec3(1.0); //Shift HSV colors
|
||||
|
||||
uniform bool doShiftFirst = false; // do shifting colors first or flooring colors
|
||||
uniform bool includeAlpha = true; // Include alpha objects. if certain objects that have alpha aren`t rendering disabling might help
|
||||
@@ -33,21 +33,21 @@ void vertex()
|
||||
void fragment() {
|
||||
vec4 tex = texture(SCREEN_TEXTURE, vec2(UV.x, -UV.y));
|
||||
vec3 hvs = rgb_to_hsv(tex.xyz);
|
||||
|
||||
|
||||
if (doShiftFirst){
|
||||
hvs.xyz = (hvs * colorShift);
|
||||
}
|
||||
|
||||
|
||||
hvs.x = floor(hvs.x * colorCount.x) / colorCount.x;
|
||||
hvs.y = floor(hvs.y * colorCount.y) / colorCount.y;
|
||||
hvs.z = floor(hvs.z * colorCount.z) / colorCount.z;
|
||||
|
||||
|
||||
if (!doShiftFirst){
|
||||
hvs.xyz = (hvs * colorShift);
|
||||
}
|
||||
|
||||
ALBEDO = hsv_to_rgb(hvs.xyz);
|
||||
|
||||
|
||||
if (!includeAlpha){
|
||||
ALPHA = tex.w;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user