Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: data/branches/Shader_HS18/programs/Example/GLSLES/Example_ProjectionVp.glsles @ 12091

Last change on this file since 12091 was 12091, checked in by wiesep, 6 years ago

Updated programs and adjusted Material to work with GLSL>150

File size: 603 bytes
Line 
1
2void generalPurposeProjection_vp(
3                float4 pos                      : POSITION,
4               
5                out float4 oPos         : POSITION,
6                out float4 texCoord : TEXCOORD0,
7
8                uniform float4x4 worldViewProjMatrix,
9                uniform float4x4 worldMatrix,
10                uniform float4x4 texViewProjMatrix)
11{
12        oPos = mul(worldViewProjMatrix, pos);
13        // multiply position by world matrix, then by projective view/proj
14        float4 newpos = mul(worldMatrix, pos);
15        texCoord = mul(texViewProjMatrix, newpos);
16}
17
18void generalPurposeProjection_fp(
19                float4 texCoord         : TEXCOORD0,
20                out float4 col          : COLOR,
21                uniform sampler2D texMap)
22{
23        col = tex2Dproj(texMap, texCoord);
24}
25               
26
Note: See TracBrowser for help on using the repository browser.