diff options
Diffstat (limited to 'indra/newview/app_settings')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/pbrterrainF.glsl | 10 | ||||
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/pbrterrainUtilF.glsl | 19 |
2 files changed, 19 insertions, 10 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/pbrterrainF.glsl b/indra/newview/app_settings/shaders/class1/deferred/pbrterrainF.glsl index 10a147a039..19de8568b8 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/pbrterrainF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/pbrterrainF.glsl @@ -135,16 +135,16 @@ void main() tnorm *= gl_FrontFacing ? 1.0 : -1.0; -#if 0 // TODO: Remove debug +#if 1 // TODO: Remove debug //col.xyz = (tnorm + 1.0) / 2.0;// TODO: Remove //col.xyz = (vary_normal + 1.0) / 2.0;// TODO: Remove //col.xyz = spec; // TODO: Remove //col.xyz = vec3(1); // TODO: Remove //float weight = 1.0; spec.rgb = (weight * spec.rgb) + ((1 - weight) * vec3(1.0, 1.0, 1.0)); // TODO: Remove - //tnorm = vary_normal; // TODO: Remove - //spec.r = 1.0; // TODO: Remove - //spec.gb = vec2(1.0, 0.0); // TODO: Remove - //emissive.rgb = vec3(0); // TODO: Remove + tnorm = vary_normal; // TODO: Remove + spec.r = 1.0; // TODO: Remove + spec.gb = vec2(1.0, 0.0); // TODO: Remove + emissive.rgb = vec3(0); // TODO: Remove #endif frag_data[0] = max(vec4(col.xyz, 0.0), vec4(0)); // Diffuse frag_data[1] = max(vec4(spec.rgb, base_color_factor_alpha), vec4(0)); // PBR linear packed Occlusion, Roughness, Metal. diff --git a/indra/newview/app_settings/shaders/class1/deferred/pbrterrainUtilF.glsl b/indra/newview/app_settings/shaders/class1/deferred/pbrterrainUtilF.glsl index 1f8b0b97c7..327d23d2e7 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/pbrterrainUtilF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/pbrterrainUtilF.glsl @@ -129,8 +129,13 @@ TerrainSample _t_sample(sampler2D tex, TerrainCoord terrain_coord, TerrainWeight { TerrainSample ts; -#define do_sample_x() _t_texture(tex, terrain_coord[0].zw, sign(vary_vertex_normal.x)); -#define do_sample_y() _t_texture(tex, terrain_coord[1].xy, sign(vary_vertex_normal.y)); +#if 0 +#define do_sample_x() _t_texture(tex, terrain_coord[0].zw, sign(vary_vertex_normal.x)) +#define do_sample_y() _t_texture(tex, terrain_coord[1].xy, sign(vary_vertex_normal.y)) +#else // TODO: Remove debug +#define do_sample_x() _t_texture(tex, terrain_coord[0].xy, sign(vary_vertex_normal.z)) +#define do_sample_y() _t_texture(tex, terrain_coord[0].xy, sign(vary_vertex_normal.z)) +#endif #define do_sample_z() _t_texture(tex, terrain_coord[0].xy, sign(vary_vertex_normal.z)); switch (tw.type) { @@ -219,15 +224,15 @@ vec4 terrain_texture(sampler2D tex, TerrainCoord terrain_coord) TerrainSample ts = _t_sample(tex, terrain_coord, tw); -#if 1 +#if 0 return ((ts.x * tw.weight.x) + (ts.y * tw.weight.y) + (ts.z * tw.weight.z)) / (tw.weight.x + tw.weight.y + tw.weight.z); #else // TODO: Remove debug //return vec4(((tw.usage - normalize(tw.weight))) / 0.5, 1.0); -#if 1 +#if 0 return vec4(tw.usage, 1.0); #else //return vec4(tw.usage, 1.0); - return vec4((tw.usage + weight) / 2.0, 1.0); + return vec4((tw.usage + tw.weight) / 2.0, 1.0); #endif #endif } @@ -256,7 +261,11 @@ vec4 terrain_texture_color(sampler2D tex, TerrainCoord terrain_coord) TerrainSample ts = _t_sample_c(tex, terrain_coord, tw); +#if 0 return ((ts.x * tw.weight.x) + (ts.y * tw.weight.y) + (ts.z * tw.weight.z)) / (tw.weight.x + tw.weight.y + tw.weight.z); +#else // TODO: Remove debug + return ts.x; +#endif } #elif TERRAIN_PLANAR_TEXTURE_SAMPLE_COUNT == 1 |