forked from ClassiCube/ClassiCube
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master'
- Loading branch information
Showing
30 changed files
with
616 additions
and
214 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,10 @@ | ||
struct vOut { | ||
float4 color : COLOR; | ||
}; | ||
|
||
float4 main( | ||
vOut input | ||
) : COLOR | ||
{ | ||
return input.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,12 @@ | ||
struct vOut { | ||
float4 color : COLOR; | ||
float2 tex0 : TEXCOORD0; | ||
}; | ||
|
||
float4 main( | ||
vOut input, | ||
uniform sampler2D tex | ||
) : COLOR | ||
{ | ||
return tex2D(tex, input.tex0.xy) * input.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
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,35 @@ | ||
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, | ||
uniform float4 half_viewport | ||
) | ||
{ | ||
vOut result; | ||
float4 position; | ||
|
||
position = float4(input.position.xyz, 1.0f); | ||
position = mul(position, mvp); | ||
position.xyz = position.xyz / position.w; | ||
|
||
position.x = position.x * half_viewport.x + half_viewport.x; | ||
position.y = -position.y * half_viewport.y + half_viewport.y; | ||
position.z = position.z * half_viewport.z + half_viewport.z; | ||
//position.w = 1.0 / half_viewport.w; | ||
|
||
result.pos = position; | ||
result.col = input.color; | ||
result.tex = input.tex; | ||
return result; | ||
} |
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
Oops, something went wrong.