NORSPEC-59 and NORSPEC-133 work-around crash with RenderDebugGL on and fix breakage in shaders from Mac changes
parent
119c0a35f1
commit
e40bcc4e16
|
|
@ -2223,7 +2223,7 @@ void LLVertexBuffer::setBuffer(U32 data_mask)
|
|||
|
||||
if ((data_mask & required_mask) != required_mask)
|
||||
{
|
||||
llerrs << "Shader consumption mismatches data provision." << llendl;
|
||||
llwarns << "Shader consumption mismatches data provision." << llendl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8072,7 +8072,7 @@
|
|||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>RenderDebugNormalScale</key>
|
||||
<map>
|
||||
|
|
|
|||
|
|
@ -136,8 +136,7 @@ void main()
|
|||
float vertex_color_alpha = vertex_color.a;
|
||||
#endif
|
||||
|
||||
vec3 normal = vary_norm;
|
||||
normal = texture2D(bumpMap, vary_texcoord1.xy).xyz * 2 - 1;
|
||||
vec3 normal = texture2D(bumpMap, vary_texcoord1.xy).xyz * 2 - 1;
|
||||
normal = vec3(dot(normal.xyz, vary_rotation[0]),
|
||||
dot(normal.xyz, vary_rotation[1]),
|
||||
dot(normal.xyz, vary_rotation[2]));
|
||||
|
|
@ -152,10 +151,10 @@ void main()
|
|||
color.rgb = atmosLighting(color.rgb);
|
||||
|
||||
color.rgb = scaleSoftClip(color.rgb);
|
||||
col = vec3(0,0,0);
|
||||
col = vec4(0,0,0,0);
|
||||
|
||||
#define LIGHT_LOOP(i) \
|
||||
col += light_diffuse[i].rgb * calcPointLightOrSpotLight(pos.xyz, vary_norm, light_position[i], light_direction[i], light_attenuation[i].x, light_attenuation[i].y, light_attenuation[i].z);
|
||||
col.rgb += light_diffuse[i].rgb * calcPointLightOrSpotLight(pos.xyz, normal, light_position[i], light_direction[i].xyz, light_attenuation[i].x, light_attenuation[i].y, light_attenuation[i].z);
|
||||
|
||||
LIGHT_LOOP(1)
|
||||
LIGHT_LOOP(2)
|
||||
|
|
@ -165,7 +164,7 @@ void main()
|
|||
LIGHT_LOOP(6)
|
||||
LIGHT_LOOP(7)
|
||||
|
||||
color.rgb += diff.rgb * vary_pointlight_col * col;
|
||||
color.rgb += diff.rgb * vary_pointlight_col * col.rgb;
|
||||
|
||||
frag_color = color;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,7 +68,6 @@ VARYING vec4 vertex_color;
|
|||
|
||||
uniform mat4 shadow_matrix[6];
|
||||
uniform vec4 shadow_clip;
|
||||
uniform vec2 shadow_res;
|
||||
uniform float shadow_bias;
|
||||
|
||||
uniform mat4 inv_proj;
|
||||
|
|
@ -210,11 +209,11 @@ void main()
|
|||
shadow = 1.0;
|
||||
}
|
||||
|
||||
#if INDEX_MODE == INDEXED
|
||||
|
||||
vec4 diff = diffuseLookup(vary_texcoord0.xy);
|
||||
vec4 diff;
|
||||
#if INDEX_MODE == INDEXED
|
||||
diff = diffuseLookup(vary_texcoord0.xy);
|
||||
#else
|
||||
vec4 diff = texture2D(diffuseMap,vary_texcoord0.xy);
|
||||
diff = texture2D(diffuseMap,vary_texcoord0.xy);
|
||||
#endif
|
||||
|
||||
#if INDEX_MODE == NON_INDEXED_NO_COLOR
|
||||
|
|
@ -223,8 +222,7 @@ void main()
|
|||
float vertex_color_alpha = vertex_color.a;
|
||||
#endif
|
||||
|
||||
vec3 normal = vary_norm;
|
||||
normal = texture2D(bumpMap, vary_texcoord1.xy).xyz * 2 - 1;
|
||||
vec3 normal = texture2D(bumpMap, vary_texcoord1.xy).xyz * 2 - 1;
|
||||
normal = vec3(dot(normal.xyz, vary_rotation[0]),
|
||||
dot(normal.xyz, vary_rotation[1]),
|
||||
dot(normal.xyz, vary_rotation[2]));
|
||||
|
|
@ -232,7 +230,6 @@ void main()
|
|||
vec3 l = light_position[0].xyz;
|
||||
vec3 dlight = calcDirectionalLight(normal, l);
|
||||
dlight = dlight * vary_directional.rgb * vary_pointlight_col;
|
||||
vec4 diff = diffuseLookup(vary_texcoord0.xy);
|
||||
|
||||
vec4 col = vec4(vary_ambient + dlight *shadow, vertex_color_alpha);
|
||||
vec4 color = diff * col;
|
||||
|
|
@ -240,10 +237,10 @@ void main()
|
|||
color.rgb = atmosLighting(color.rgb);
|
||||
|
||||
color.rgb = scaleSoftClip(color.rgb);
|
||||
col = vec3(0,0,0);
|
||||
col = vec4(0,0,0,0);
|
||||
|
||||
#define LIGHT_LOOP(i) \
|
||||
col += light_diffuse[i].rgb * calcPointLightOrSpotLight(pos.xyz, vary_norm, light_position[i], light_direction[i], light_attenuation[i].x, light_attenuation[i].y, light_attenuation[i].z);
|
||||
col.rgb += light_diffuse[i].rgb * calcPointLightOrSpotLight(pos.xyz, normal, light_position[i], light_direction[i].xyz, light_attenuation[i].x, light_attenuation[i].y, light_attenuation[i].z);
|
||||
|
||||
LIGHT_LOOP(1)
|
||||
LIGHT_LOOP(2)
|
||||
|
|
@ -253,7 +250,7 @@ void main()
|
|||
LIGHT_LOOP(6)
|
||||
LIGHT_LOOP(7)
|
||||
|
||||
color.rgb += diff.rgb * vary_pointlight_col * col;
|
||||
color.rgb += diff.rgb * vary_pointlight_col * col.rgb;
|
||||
|
||||
frag_color = color;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -515,21 +515,14 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask)
|
|||
current_shader->bindTexture(LLShaderMgr::SPECULAR_MAP, LLViewerFetchedTexture::sWhiteImagep);
|
||||
}
|
||||
}
|
||||
} else if (current_shader == simple_shader)
|
||||
} else if (LLPipeline::sRenderDeferred && current_shader && (current_shader == simple_shader))
|
||||
{
|
||||
// No material. Propegate with default parameters.
|
||||
if (LLPipeline::sRenderDeferred)
|
||||
{
|
||||
current_shader->uniform4f(LLShaderMgr::SPECULAR_COLOR, 0.0f, 0.0f, 0.0f, 0.0f);
|
||||
|
||||
current_shader->uniform1f(LLShaderMgr::ENVIRONMENT_INTENSITY, 0.0f);
|
||||
|
||||
LLViewerFetchedTexture::sFlatNormalImagep->addTextureStats(params.mVSize);
|
||||
current_shader->bindTexture(LLShaderMgr::BUMP_MAP, LLViewerFetchedTexture::sFlatNormalImagep);
|
||||
|
||||
LLViewerFetchedTexture::sWhiteImagep->addTextureStats(params.mVSize);
|
||||
current_shader->bindTexture(LLShaderMgr::SPECULAR_MAP, LLViewerFetchedTexture::sWhiteImagep);
|
||||
}
|
||||
current_shader->uniform4f(LLShaderMgr::SPECULAR_COLOR, 1.0f, 1.0f, 1.0f, 1.0f);
|
||||
current_shader->uniform1f(LLShaderMgr::ENVIRONMENT_INTENSITY, 0.0f);
|
||||
LLViewerFetchedTexture::sFlatNormalImagep->addTextureStats(params.mVSize);
|
||||
current_shader->bindTexture(LLShaderMgr::BUMP_MAP, LLViewerFetchedTexture::sFlatNormalImagep);
|
||||
LLViewerFetchedTexture::sWhiteImagep->addTextureStats(params.mVSize);
|
||||
current_shader->bindTexture(LLShaderMgr::SPECULAR_MAP, LLViewerFetchedTexture::sWhiteImagep);
|
||||
}
|
||||
|
||||
if (params.mGroup)
|
||||
|
|
|
|||
Loading…
Reference in New Issue