Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
direct-5D-viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OpenSource
direct-5D-viewer
Commits
cbce0bd8
Commit
cbce0bd8
authored
10 years ago
by
Eric Wait
Browse files
Options
Downloads
Patches
Plain Diff
COMPILED version 0.1b
parent
2e39fb6e
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
bin64/DefaultMeshShaders.fx
+62
-0
62 additions, 0 deletions
bin64/DefaultMeshShaders.fx
bin64/ViewAlignedVertexShader.fx
+32
-0
32 additions, 0 deletions
bin64/ViewAlignedVertexShader.fx
bin64/lever3d.exe
+0
-0
0 additions, 0 deletions
bin64/lever3d.exe
with
94 additions
and
0 deletions
bin64/DefaultMeshShaders.fx
0 → 100644
+
62
−
0
View file @
cbce0bd8
cbuffer VSConstantBuffer : register( b0 )
{
matrix World;
matrix View;
matrix Projection;
float4 depthPeelPlanes;
};
cbuffer PSConstantBuffer : register( b1 )
{
float4 color;
float4 colorModifier;
};
struct VS_OUTPUT
{
float4 Pos : SV_POSITION;
float3 TextureUV : TEXCOORD0;
float3 Normal : NORMAL;
float4 clipPlane[2] : SV_ClipDistance;
};
struct PS_OUTPUT
{
float4 color : SV_TARGET;
float depth : SV_DEPTH;
};
VS_OUTPUT DefaultMeshVertexShader( float4 Pos : POSITION, float3 TextureUV : TEXCOORD, float3 Normal : NORMAL )
{
VS_OUTPUT output = (VS_OUTPUT)0;
output.TextureUV = TextureUV;
output.Pos = mul( Pos, World );
output.clipPlane[0] = float4(0,0,0, output.Pos.z-depthPeelPlanes.x);
output.clipPlane[1] = float4(0,0,0, depthPeelPlanes.y-output.Pos.z);
output.Pos = mul( output.Pos, View );
output.Pos = mul( output.Pos, Projection );
output.Normal = mul( Normal, World );
return output;
}
PS_OUTPUT DefaultMeshPixelShader( VS_OUTPUT input )
{
PS_OUTPUT output;
float4 mainLightDir = float4(-0.5774,-0.5774,0.5774,0);
float lightInt = 0.7*dot(-input.Normal,mainLightDir);
lightInt = saturate(lightInt) + 0.3;
float3 cval = color*lightInt;
output.color = float4(cval.x, cval.y, cval.z, color.w) * colorModifier;
output.depth = input.Pos.z;
return output;
}
This diff is collapsed.
Click to expand it.
bin64/ViewAlignedVertexShader.fx
0 → 100644
+
32
−
0
View file @
cbce0bd8
cbuffer VSConstantBuffer : register( b0 )
{
matrix World;
matrix View;
matrix Projection;
float4 depthPeelPlanes;
};
struct VS_OUTPUT
{
float4 Pos : SV_POSITION;
float3 TextureUV : TEXCOORD0;
float3 Normal : NORMAL;
float3 Dpth : TEXCOORD1;
float4 clipPlane[2] : SV_ClipDistance;
};
VS_OUTPUT ViewAlignedVertexShader( float4 Pos : POSITION, float3 TextureUV : TEXCOORD, float3 Normal : NORMAL )
{
VS_OUTPUT output = (VS_OUTPUT)0;
output.TextureUV = mul(float4(TextureUV,1), World).xyz;
output.clipPlane[0] = float4(output.TextureUV.x, output.TextureUV.y, output.TextureUV.z,Pos.z-depthPeelPlanes.x);
output.clipPlane[1] = float4(1.0f-output.TextureUV.x, 1.0f-output.TextureUV.y, 1.0f-output.TextureUV.z,depthPeelPlanes.y-Pos.z);
output.Pos = mul( Pos, View );
output.Pos = mul( output.Pos, Projection );
output.Dpth = Pos.xyz;
return output;
}
This diff is collapsed.
Click to expand it.
bin64/lever3d.exe
0 → 100644
+
0
−
0
View file @
cbce0bd8
File added
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment