-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
756f930
commit 7782ca8
Showing
5 changed files
with
40 additions
and
50 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
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
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 |
---|---|---|
@@ -1,24 +1,11 @@ | ||
struct vIn { | ||
float4 color : DIFFUSE; | ||
float4 position : POSITION; | ||
}; | ||
|
||
struct vOut { | ||
float4 col : COLOR; | ||
float4 pos : POSITION; | ||
}; | ||
|
||
vOut main( | ||
vIn input, | ||
uniform float4x4 mvp | ||
) | ||
void main( | ||
float4 in_position : POSITION, | ||
float4 in_color : DIFFUSE, | ||
uniform float4x4 mvp, | ||
out float4 out_pos : POSITION, | ||
out float4 out_color : COLOR) | ||
{ | ||
vOut result; | ||
float4 position; | ||
|
||
position = float4(input.position.xyz, 1.0f); | ||
|
||
result.pos = mul(position, mvp); | ||
result.col = input.color; | ||
return result; | ||
float4 pos = float4(in_position.xyz, 1.0f); | ||
out_pos = mul(pos, mvp); | ||
out_color = in_color; | ||
} |
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,15 @@ | ||
void main( | ||
float4 in_position : POSITION, | ||
float4 in_color : DIFFUSE, | ||
float4 in_tex : TEXCOORD, | ||
uniform float4x4 mvp, | ||
uniform float4 uv_offset, | ||
out float4 out_pos : POSITION, | ||
out float4 out_color : COLOR, | ||
out float2 out_tex : TEXCOORD0) | ||
{ | ||
float4 pos = float4(in_position.xyz, 1.0f); | ||
out_pos = mul(pos, mvp); | ||
out_color = in_color; | ||
out_tex = in_tex + uv_offset; | ||
} |
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 |
---|---|---|
@@ -1,27 +1,14 @@ | ||
struct vIn { | ||
float4 tex : TEXCOORD; | ||
float4 color : DIFFUSE; | ||
float4 position : POSITION; | ||
}; | ||
|
||
struct vOut { | ||
float4 pos : POSITION; | ||
float4 col : COLOR; | ||
float4 tex : TEXCOORD0; | ||
}; | ||
|
||
vOut main( | ||
vIn input, | ||
uniform float4x4 mvp | ||
) | ||
void main( | ||
float4 in_position : POSITION, | ||
float4 in_color : DIFFUSE, | ||
float4 in_tex : TEXCOORD, | ||
uniform float4x4 mvp, | ||
out float4 out_pos : POSITION, | ||
out float4 out_color : COLOR, | ||
out float2 out_tex : TEXCOORD0) | ||
{ | ||
vOut result; | ||
float4 position; | ||
|
||
position = float4(input.position.xyz, 1.0f); | ||
|
||
result.pos = mul(position, mvp); | ||
result.col = input.color; | ||
result.tex = input.tex; | ||
return result; | ||
float4 pos = float4(in_position.xyz, 1.0f); | ||
out_pos = mul(pos, mvp); | ||
out_color = in_color; | ||
out_tex = in_tex; | ||
} |