mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-11-11 06:15:05 +00:00
examples: Fix float4->float2 cast
This commit is contained in:
parent
2962be9d52
commit
686eebd969
1 changed files with 1 additions and 1 deletions
|
@ -54,7 +54,7 @@ uniform float DisplacementRange<
|
|||
float4 DisplacementPixelShader_v1(VertexInformation vtx) : TARGET {
|
||||
// Calculate proper offset.
|
||||
// 1. Sample the DisplacementMap texture.
|
||||
float2 offset = DisplacementMap.Sample(LinearClampSampler, vtx.texcoord0.xy);
|
||||
float2 offset = DisplacementMap.Sample(LinearClampSampler, vtx.texcoord0.xy).rg;
|
||||
// 2. Convert from [+0.0, +1.0] to [-0.5, +0.5].
|
||||
offset -= .5f;
|
||||
// 3. Fix the aliasing that happens with 8bpc normal maps, which also gives us the range [-1.0, +1.0].
|
||||
|
|
Loading…
Reference in a new issue