|
|
|
|
|
|
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 |
|
|
|
} |
|
|
|