mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 05:19:55 +00:00
25 lines
640 B
Text
25 lines
640 B
Text
|
void glass_vp
|
||
|
(
|
||
|
in float4 inPos : POSITION,
|
||
|
|
||
|
out float4 pos : POSITION,
|
||
|
out float2 uv0 : TEXCOORD0,
|
||
|
out float4 noiseCoord : TEXCOORD1,
|
||
|
|
||
|
uniform float4x4 worldViewProj,
|
||
|
uniform float timeVal,
|
||
|
uniform float scale
|
||
|
)
|
||
|
{
|
||
|
// Use standardise transform, so work accord with render system specific (RS depth, requires texture flipping, etc)
|
||
|
pos = mul(worldViewProj, inPos);
|
||
|
|
||
|
// The input positions adjusted by texel offsets, so clean up inaccuracies
|
||
|
inPos.xy = sign(inPos.xy);
|
||
|
|
||
|
// Convert to image-space
|
||
|
uv0 = (float2(inPos.x, -inPos.y) + 1.0f) * 0.5f;
|
||
|
noiseCoord = (pos + timeVal) * scale;
|
||
|
}
|
||
|
|