This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
ibl_sample_shader_lys [2017/05/16 02:57] adavies |
ibl_sample_shader_lys [2017/05/23 03:49] (current) |
||
---|---|---|---|
Line 193: | Line 193: | ||
| | ||
// material properties from texture | // material properties from texture | ||
- | float smoothness = smoothness_tex.Sample(samLinear, st).x; // not gamma corrected | + | float smoothness = smoothness_tex.Sample(samLinear, st).x; // inverted roughness texture map (1-x) and no gamma correction |
float perceptualRoughness = 1.0 - smoothness; | float perceptualRoughness = 1.0 - smoothness; | ||
+ | //float perceptualRoughness = roughness_tex.Sample(samLinear, st).x; // For those using roughness texture maps use this line instead to initialize perceptualRoughness. | ||
float metalness = metalness_tex.Sample(samLinear, st).x; // not gamma corrected | float metalness = metalness_tex.Sample(samLinear, st).x; // not gamma corrected | ||
float3 texNormal = 2*normal_tex.Sample(samLinear, st).xyz - 1.0; // not gamma corrected | float3 texNormal = 2*normal_tex.Sample(samLinear, st).xyz - 1.0; // not gamma corrected |