浏览代码

Fixed particles color modes.

/main
Felipe Lira 7 年前
当前提交
dc0d6bd3
共有 4 个文件被更改,包括 13 次插入6 次删除
  1. 2
      ScriptableRenderPipeline/LightweightPipeline/LWRP/ShaderLibrary/Particles.hlsl
  2. 5
      ScriptableRenderPipeline/LightweightPipeline/LWRP/Shaders/LightweightStandardParticles.shader
  3. 7
      ScriptableRenderPipeline/LightweightPipeline/LWRP/Shaders/LightweightStandardParticlesSimpleLighting.shader
  4. 5
      ScriptableRenderPipeline/LightweightPipeline/LWRP/Shaders/LightweightStandardParticlesUnlit.shader

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


half4 SampleAlbedo(VertexOutputLit IN, TEXTURE2D_ARGS(albedoMap, sampler_albedoMap))
{
half4 albedo = readTexture(TEXTURE2D_PARAM(albedoMap, sampler_albedoMap), IN) * IN.color;
half4 albedo = readTexture(TEXTURE2D_PARAM(albedoMap, sampler_albedoMap), IN) * _Color;
// No distortion Support
fragColorMode(IN);

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


VertexOutputLit o;
OUTPUT_NORMAL(v, o);
o.color = v.color * _Color;
o.color = v.color;
// TODO: Instancing
// vertColor(v.color);
vertTexcoord(v, o);
vertFading(o, o.posWS, o.clipPos);
return o;

7
ScriptableRenderPipeline/LightweightPipeline/LWRP/Shaders/LightweightStandardParticlesSimpleLighting.shader


OUTPUT_NORMAL(v, o);
o.color = v.color * _Color;
o.color = v.color;
// TODO: Instancing
// vertColor(o.color);
vertTexcoord(v, o);
vertFading(o, o.posWS, o.clipPos);
return o;

{
half4 albedo = SampleAlbedo(IN, TEXTURE2D_PARAM(_MainTex, sampler_MainTex));
half3 diffuse = AlphaModulate(albedo.rgb, albedo.a);
half3 diffuse = AlphaModulate(albedo.rgb, alpha);
half3 normalTS = SampleNormalTS(IN, TEXTURE2D_PARAM(_BumpMap, sampler_BumpMap));
half3 emission = SampleEmission(IN, _EmissionColor.rgb, TEXTURE2D_PARAM(_EmissionMap, sampler_EmissionMap));
half4 specularGloss = SampleSpecularGloss(IN, albedo.a, _SpecColor, TEXTURE2D_PARAM(_SpecGlossMap, sampler_SpecGlossMap));

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


o.posWS.xyz = TransformObjectToWorld(v.vertex.xyz);
o.posWS.w = ComputeFogFactor(o.clipPos.z);
o.clipPos = TransformWorldToHClip(o.posWS.xyz);
o.color = v.color * _Color;
o.color = v.color;
vertColor(o.color);
// TODO: Instancing
//vertColor(o.color);
vertTexcoord(v, o);
vertFading(o, o.posWS, o.clipPos);

正在加载...
取消
保存