-
-
Notifications
You must be signed in to change notification settings - Fork 454
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#include "common.h" | ||
#include "iostructs\v_editor.h" | ||
|
||
uniform float4 tfactor; | ||
v2p _main (vf i) | ||
{ | ||
v2p o; | ||
|
||
o.P = mul (m_WVP, i.P); // xform, input in world coords | ||
o.C = tfactor*i.C; | ||
|
||
return o; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
|
||
out gl_PerVertex { vec4 gl_Position; }; | ||
|
||
struct vf | ||
{ | ||
float4 C ; // COLOR0; | ||
float4 P ; // POSITION; | ||
}; | ||
|
||
struct v2p | ||
{ | ||
float4 C ; // COLOR0; | ||
float4 P ; // SV_Position; | ||
}; | ||
|
||
layout(location = COLOR0) in float4 v_editor_C ; // COLOR0; | ||
layout(location = POSITION) in float4 v_editor_P ; // POSITION; | ||
|
||
layout(location = COLOR0) out float4 v2p_editor_C ; // COLOR0; | ||
|
||
v2p _main (vf i); | ||
|
||
void main() | ||
{ | ||
vf I; | ||
I.C = v_editor_C; | ||
I.P = v_editor_P; | ||
|
||
v2p O = _main (I); | ||
|
||
v2p_editor_C = O.C; | ||
gl_Position = O.P; | ||
} |