Using viewport texture instead of manual rect blending
This commit is contained in:
@@ -11,9 +11,14 @@ void fragment() {
|
||||
vec4 projected_coords = INV_VIEW_MATRIX * vec4(VERTEX, 1.0);
|
||||
|
||||
vec4 currentColor = textureLod(screen_texture, SCREEN_UV, 0.0);
|
||||
vec4 worldColor = textureLod(world_color_texture, projected_coords.xz * 0.01 + vec2(0.5), 0.0);
|
||||
vec4 playerColorationColor = textureLod(world_color_texture, projected_coords.xz * 0.01 + vec2(0.5), 0.0);
|
||||
vec3 colorToLuminance = vec3(0.2126, 0.7152, 0.0722);
|
||||
ALBEDO = vec3(dot(currentColor.rgb, colorToLuminance) * 0.4) + 0.2 * currentColor.rgb + 0.4 * worldColor.rgb;
|
||||
|
||||
vec3 desaturatedColor = vec3(dot(currentColor.rgb, colorToLuminance) * 0.4) + 0.1 * currentColor.rgb;
|
||||
|
||||
ALBEDO = desaturatedColor * (1.0 - playerColorationColor.a) + currentColor.rgb * playerColorationColor.a;
|
||||
|
||||
ALBEDO = desaturatedColor * (1.0 - playerColorationColor.a) + (playerColorationColor.rgb * 0.3 + currentColor.rgb * 0.7) * playerColorationColor.a;
|
||||
}
|
||||
|
||||
//void light() {
|
||||
|
||||
Reference in New Issue
Block a user