浏览代码

Removed NO_SHADOWS define as it's not really necessary. If one doesn't want shadow support only thing that needs to be done is to not define _SHADOWS_ENABLED or _LOCAL_SHADOWS_ENABLED in the shader.

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

4
ScriptableRenderPipeline/LightweightPipeline/LWRP/ShaderLibrary/Shadows.hlsl


half MainLightRealtimeShadowAttenuation(float4 shadowCoord)
{
#if defined(NO_SHADOWS) || !defined(_SHADOWS_ENABLED)
#if !defined(_SHADOWS_ENABLED)
return 1.0h;
#elif SHADOWS_SCREEN
return SampleScreenSpaceShadowMap(shadowCoord);

half LocalLightRealtimeShadowAttenuation(int lightIndex, float3 positionWS)
{
#if defined(NO_SHADOWS) || !defined(_LOCAL_SHADOWS_ENABLED)
#if !defined(_LOCAL_SHADOWS_ENABLED)
return 1.0h;
#else
float4 shadowCoord = mul(_LocalWorldToShadowAtlas[lightIndex], float4(positionWS, 1.0));

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


#pragma shader_feature _FADING_ON
#pragma shader_feature _REQUIRE_UV2
#define NO_SHADOWS 1
#include "LWRP/ShaderLibrary/ParticlesPBR.hlsl"
#include "LWRP/ShaderLibrary/Lighting.hlsl"

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


#pragma shader_feature _REQUIRE_UV2
#define BUMP_SCALE_NOT_SUPPORTED 1
#define NO_SHADOWS 1
#include "LWRP/ShaderLibrary/Particles.hlsl"
#include "LWRP/ShaderLibrary/Lighting.hlsl"

正在加载...
取消
保存