Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- in diffuse_sun.hlsl
- #ifndef GLASS_MATERIAL
- res.a = diffuseColor.a * MeltFactor.x;
- #else
- float specularMax = saturate(max(max(specular.r, specular.g), specular.b));
- if(transparencyFlag == TRANSPARENCY_ADD){
- res.a = saturate(diffuseColor.a + specularMax) * MeltFactor.x * max(SUM_BLEND_SHADOW_COEF_ALPHA, shadow);
- res.a *= 0.20+pow(clamp(1-sunDir.y, 0.1, 1),3)*0.15;
- res.rgb *= max(SUM_BLEND_SHADOW_COEF, shadow);
- }else{
- //float shadowedAlpha = specularMax * lerp(max(BLEND_SHADOW_COEF, shadow), 1.0, BLEND_SHADOW_SPLIT_COEF);
- //res.a = saturate(diffuseColor.a + shadowedAlpha) * MeltFactor.x;
- //res.a = lerp(res.a, res.a * 0.25, smoothstep(0.0, 0.3, -sunDir.y));
- res.a = diffuseColor.a * MeltFactor.x;
- res.rgb *= lerp(max(BLEND_SHADOW_COEF, shadow), 1.0, 1.0 - BLEND_SHADOW_SPLIT_COEF);
- }
- #endif
- and
- //res += calcScratches(input, shadow);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement