浏览代码

fixed particles alpha discard and modulate

/tag-1.1.4-preview
Felipe Lira 7 年前
当前提交
5ee683e3
共有 3 个文件被更改,包括 4 次插入5 次删除
  1. 2
      ScriptableRenderPipeline/LightweightPipeline/LWRP/ShaderLibrary/Particles.hlsl
  2. 2
      ScriptableRenderPipeline/LightweightPipeline/LWRP/ShaderLibrary/ParticlesPBR.hlsl
  3. 5
      ScriptableRenderPipeline/LightweightPipeline/LWRP/Shaders/LightweightStandardParticlesUnlit.shader

2
ScriptableRenderPipeline/LightweightPipeline/LWRP/ShaderLibrary/Particles.hlsl


#else
half result = 1.0h;
#endif
AlphaDiscard(result, cutoff, 0.0001h);
AlphaDiscard(alpha, cutoff, 0.0001h);
return result;
}

2
ScriptableRenderPipeline/LightweightPipeline/LWRP/ShaderLibrary/ParticlesPBR.hlsl


surfaceData.smoothness = metallicGloss.g;
surfaceData.occlusion = 1.0;
surfaceData.albedo = AlphaModulate(surfaceData.albedo, albedo.a);
surfaceData.albedo = AlphaModulate(surfaceData.albedo, surfaceData.alpha);
}
#endif // LIGHTWEIGHT_PARTICLES_PBR_INCLUDED

5
ScriptableRenderPipeline/LightweightPipeline/LWRP/Shaders/LightweightStandardParticlesUnlit.shader


half4 fragParticleUnlit(VertexOutputLit IN) : SV_Target
{
half4 albedo = SampleAlbedo(IN, TEXTURE2D_PARAM(_MainTex, sampler_MainTex));
half3 diffuse = AlphaModulate(albedo.rgb, albedo.a);
half3 diffuse = AlphaModulate(albedo.rgb, alpha);
half fogFactor = IN.posWS.w;
ApplyFogColor(result, half3(0, 0, 0), fogFactor);
return half4(result, alpha);

正在加载...
取消
保存