浏览代码

[ReflectionProbe] Added dimmer

/feature-ReflectionProbeFit
Frédéric Vauchelles 7 年前
当前提交
0cd861ee
共有 6 个文件被更改,包括 11 次插入6 次删除
  1. 2
      ScriptableRenderPipeline/HDRenderPipeline/Editor/Lighting/HDReflectionProbeEditor.cs
  2. 2
      ScriptableRenderPipeline/HDRenderPipeline/Lighting/LightDefinition.cs
  3. 6
      ScriptableRenderPipeline/HDRenderPipeline/Lighting/LightDefinition.cs.hlsl
  4. 4
      ScriptableRenderPipeline/HDRenderPipeline/Lighting/LightLoop/LightLoop.cs
  5. 1
      ScriptableRenderPipeline/HDRenderPipeline/Lighting/LightUtilities.hlsl
  6. 2
      ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Lit.hlsl

2
ScriptableRenderPipeline/HDRenderPipeline/Editor/Lighting/HDReflectionProbeEditor.cs


k_InfluenceVolumeSection.Draw(s, p, this);
k_SeparateProjectionVolumeSection.Draw(s, p, this);
k_CaptureSection.Draw(s, p, this);
//k_AdditionalSection.Draw(s, p, this);
k_AdditionalSection.Draw(s, p, this);
k_BakingActions.Draw(s, p, this);
PerformOperations(s, p, this);

2
ScriptableRenderPipeline/HDRenderPipeline/Lighting/LightDefinition.cs


public float unused0;
public Vector3 offsetLS;
public float unused1;
public float dimmer;
};
// Usage of StencilBits.Lighting on 2 bits.

6
ScriptableRenderPipeline/HDRenderPipeline/Lighting/LightDefinition.cs.hlsl


float3 innerDistance;
float unused0;
float3 offsetLS;
float unused1;
float dimmer;
};
//

{
return value.offsetLS;
}
float GetUnused1(EnvLightData value)
float GetDimmer(EnvLightData value)
return value.unused1;
return value.dimmer;
}

4
ScriptableRenderPipeline/HDRenderPipeline/Lighting/LightLoop/LightLoop.cs


if (probe.boxProjection == 0)
envLightData.minProjectionDistance = 65504.0f;
envLightData.dimmer = additionalData.dimmer;
}
else
{

envLightData.envShapeType = EnvShapeType.Box;
envLightData.minProjectionDistance = 0.0f;
}
envLightData.dimmer = 1;
}
// remove scale from the matrix (Scale in this matrix is use to scale the widget)

1
ScriptableRenderPipeline/HDRenderPipeline/Lighting/LightUtilities.hlsl


output.offsetLS = float3(0.0, 0.0, 0.0);
output.innerDistance = float3(0.0, 0.0, 0.0);
output.blendDistance = 1.0;
output.dimmer = 1.0;
return output;
}

2
ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Lit.hlsl


#endif
UpdateLightingHierarchyWeights(hierarchyWeight, weight);
envLighting *= weight;
envLighting *= weight * lightData.dimmer;
if (GPUImageBasedLightingType == GPUIMAGEBASEDLIGHTINGTYPE_REFLECTION)
lighting.specularReflected = envLighting * preLightData.specularFGD;

正在加载...
取消
保存