浏览代码

Fix preview gamma handling

/RenderPassXR_Sandbox
Evgenii Golubev 8 年前
当前提交
afc2a650
共有 2 个文件被更改,包括 5 次插入5 次删除
  1. 4
      Assets/ScriptableRenderPipeline/HDRenderPipeline/SceneSettings/Resources/DrawSssProfile.shader
  2. 6
      Assets/ScriptableRenderPipeline/HDRenderPipeline/SceneSettings/Resources/DrawTransmittanceGraph.shader

4
Assets/ScriptableRenderPipeline/HDRenderPipeline/SceneSettings/Resources/DrawSssProfile.shader


float3 M = S * (exp(-r * S) + exp(-r * S * (1.0 / 3.0))) / (8 * PI * r);
// N.b.: we multiply by the surface albedo of the actual geometry during shading.
// Apply gamma for visualization only.
return float4(pow(M * _SurfaceAlbedo.rgb, 1.0 / 3.0), 1);
// Apply gamma for visualization only. Do not apply gamma to the color.
return float4(pow(M, 1.0 / 3.0) * _SurfaceAlbedo.rgb, 1);
}
ENDHLSL
}

6
Assets/ScriptableRenderPipeline/HDRenderPipeline/SceneSettings/Resources/DrawTransmittanceGraph.shader


float4 Frag(Varyings input) : SV_Target
{
float d = (_ThicknessRemap.x + input.texcoord.x * (_ThicknessRemap.y - _ThicknessRemap.x));
float3 T = ComputeTransmittance(_ShapeParameter.rgb, _VolumeAlbedo.rgb, d, 1);
float3 T = ComputeTransmittance(_ShapeParameter.rgb, float3(1, 1, 1), d, 1);
// Apply gamma for visualization only.
return float4(pow(T, 1.0 / 3), 1);
// Apply gamma for visualization only. Do not apply gamma to the color.
return float4(pow(T, 1.0 / 3) * _VolumeAlbedo.rgb, 1);
}
ENDHLSL
}

正在加载...
取消
保存