浏览代码

HDRenderPipeline: Fix various warning in csharp and shader

/main
Sebastien Lagarde 7 年前
当前提交
1641bba9
共有 5 个文件被更改,包括 13 次插入17 次删除
  1. 20
      ScriptableRenderPipeline/HDRenderPipeline/Lighting/TilePass/TilePass.cs
  2. 4
      ScriptableRenderPipeline/HDRenderPipeline/Lighting/Volumetrics/VolumetricLighting.cs
  3. 3
      ScriptableRenderPipeline/HDRenderPipeline/Material/LayeredLit/Editor/LayeredLitUI.cs
  4. 2
      ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Resources/SubsurfaceScattering.compute
  5. 1
      ScriptableRenderPipeline/HDRenderPipeline/Sky/ProceduralSky/Editor/ProceduralSkyEditor.cs

20
ScriptableRenderPipeline/HDRenderPipeline/Lighting/TilePass/TilePass.cs


Texture ltcGGXMatrix = Shader.GetGlobalTexture(HDShaderIDs._LtcGGXMatrix);
Texture ltcDisneyDiffuseMatrix = Shader.GetGlobalTexture(HDShaderIDs._LtcDisneyDiffuseMatrix);
Texture ltcMultiGGXFresnelDisneyDiffuse = Shader.GetGlobalTexture(HDShaderIDs._LtcMultiGGXFresnelDisneyDiffuse);
Texture gBufferTexture0 = Shader.GetGlobalTexture(HDShaderIDs._GBufferTexture0);
Texture gBufferTexture1 = Shader.GetGlobalTexture(HDShaderIDs._GBufferTexture1);
Texture gBufferTexture2 = Shader.GetGlobalTexture(HDShaderIDs._GBufferTexture2);
Texture gBufferTexture3 = Shader.GetGlobalTexture(HDShaderIDs._GBufferTexture3);
Texture ambientOcclusionTexture = Shader.GetGlobalTexture(HDShaderIDs._AmbientOcclusionTexture);
Matrix4x4 invScrProjection = Shader.GetGlobalMatrix(HDShaderIDs.g_mInvScrProjection);
int useTileLightList = Shader.GetGlobalInt(HDShaderIDs._UseTileLightList);

Vector4 cosTime = Shader.GetGlobalVector(HDShaderIDs._CosTime);
Vector4 unity_DeltaTime = Shader.GetGlobalVector(HDShaderIDs.unity_DeltaTime);
Vector4 worldSpaceCameraPos = Shader.GetGlobalVector(HDShaderIDs._WorldSpaceCameraPos);
Vector4 projectionParams = Shader.GetGlobalVector(HDShaderIDs._ProjectionParams);
Vector4 screenParams = Shader.GetGlobalVector(HDShaderIDs._ScreenParams);
Vector4 zbufferParams = Shader.GetGlobalVector(HDShaderIDs._ZBufferParams);
Vector4 unity_OrthoParams = Shader.GetGlobalVector(HDShaderIDs.unity_OrthoParams);
int envLightSkyEnabled = Shader.GetGlobalInt(HDShaderIDs._EnvLightSkyEnabled);
float ambientOcclusionDirectLightStrenght = Shader.GetGlobalFloat(HDShaderIDs._AmbientOcclusionDirectLightStrenght);

cmd.SetComputeBufferParam(deferredComputeShader, kernel, HDShaderIDs.g_vLightListGlobal, bUseClusteredForDeferred ? s_PerVoxelLightLists : s_LightList);
cmd.SetComputeTextureParam(deferredComputeShader, kernel, HDShaderIDs._MainDepthTexture, depthTexture);
cmd.SetComputeTextureParam(deferredComputeShader, kernel, HDShaderIDs._GBufferTexture0, HDShaderIDs._GBufferTexture0);
cmd.SetComputeTextureParam(deferredComputeShader, kernel, HDShaderIDs._GBufferTexture1, HDShaderIDs._GBufferTexture1);
cmd.SetComputeTextureParam(deferredComputeShader, kernel, HDShaderIDs._GBufferTexture2, HDShaderIDs._GBufferTexture2);
cmd.SetComputeTextureParam(deferredComputeShader, kernel, HDShaderIDs._GBufferTexture3, HDShaderIDs._GBufferTexture3);
cmd.SetComputeTextureParam(deferredComputeShader, kernel, HDShaderIDs._AmbientOcclusionTexture, HDShaderIDs._AmbientOcclusionTexture);
cmd.SetComputeTextureParam(deferredComputeShader, kernel, HDShaderIDs._GBufferTexture0, gBufferTexture0);
cmd.SetComputeTextureParam(deferredComputeShader, kernel, HDShaderIDs._GBufferTexture1, gBufferTexture1);
cmd.SetComputeTextureParam(deferredComputeShader, kernel, HDShaderIDs._GBufferTexture2, gBufferTexture2);
cmd.SetComputeTextureParam(deferredComputeShader, kernel, HDShaderIDs._GBufferTexture3, gBufferTexture3);
cmd.SetComputeTextureParam(deferredComputeShader, kernel, HDShaderIDs._AmbientOcclusionTexture, ambientOcclusionTexture);
cmd.SetComputeTextureParam(deferredComputeShader, kernel, HDShaderIDs._LtcData, ltcData);
cmd.SetComputeTextureParam(deferredComputeShader, kernel, HDShaderIDs._PreIntegratedFGD, preIntegratedFGD);

4
ScriptableRenderPipeline/HDRenderPipeline/Lighting/Volumetrics/VolumetricLighting.cs


RenderTexture m_VolumetricLightingBufferCurrentFrame = null;
RenderTexture m_VolumetricLightingBufferAccumulated = null;
RenderTargetIdentifier m_VolumetricLightingBufferCurrentFrameRT;
RenderTargetIdentifier m_VolumetricLightingBufferAccumulatedRT;
// RenderTargetIdentifier m_VolumetricLightingBufferAccumulatedRT;
ComputeShader m_VolumetricLightingCS { get { return m_Asset.renderPipelineResources.volumetricLightingCS; } }

m_VolumetricLightingBufferAccumulated.volumeDepth = d;
m_VolumetricLightingBufferAccumulated.enableRandomWrite = true;
m_VolumetricLightingBufferAccumulated.Create();
m_VolumetricLightingBufferAccumulatedRT = new RenderTargetIdentifier(m_VolumetricLightingBufferAccumulated);
// m_VolumetricLightingBufferAccumulatedRT = new RenderTargetIdentifier(m_VolumetricLightingBufferAccumulated);
}
void ClearVolumetricLightingBuffers(CommandBuffer cmd, bool isFirstFrame)

3
ScriptableRenderPipeline/HDRenderPipeline/Material/LayeredLit/Editor/LayeredLitUI.cs


public string[] GUIDArray;
}
const int kMaxLayerCount = 4;
const int kSyncButtonWidth = 58;
public LayeredLitGUI()

bool DoLayersGUI(AssetImporter materialImporter)
{
Material material = m_MaterialEditor.target as Material;
bool layerChanged = false;
GUI.changed = false;

2
ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Resources/SubsurfaceScattering.compute


{
// Unfortunately, our copy of HTile does not allow to accept at the tile rate.
// Therefore, we have to additionally perform the stencil test at the pixel rate.
passedStencilTest = stencilRef == UnpackByte(LOAD_TEXTURE2D(_StencilTexture, pixelCoord).r);
passedStencilTest = (uint)stencilRef == UnpackByte(LOAD_TEXTURE2D(_StencilTexture, pixelCoord).r);
}
return passedStencilTest;

1
ScriptableRenderPipeline/HDRenderPipeline/Sky/ProceduralSky/Editor/ProceduralSkyEditor.cs


[CustomEditor(typeof(ProceduralSkySettings))]
public class ProceduralSkySettingsEditor : Editor
{
private float heightFogFalloff = 1.0f;
private float heightFogHeight = 0.0f;
private class Styles

正在加载...
取消
保存