Commits

Vertexwahn committed 7a0fb63

Removed not needed shader files.

Comments (0)

Files changed (8)

boostFilesystemTest/src/Shader/positionNormalTexture.glsl

-struct ApplicationToVertex
-{
-	vec3 position;
-	vec3 normal;
-	vec2 uv;
-};
-
-struct VertexToFragment
-{
-	vec3 worldPosition;
-	vec3 worldNormal;
-	vec2 uv;
-};

boostFilesystemTest/src/Shader/positionNormalTextureTL.frag

-//////////////////////////////////////////////////////////////////////////////
-// Fragment Shader
-//////////////////////////////////////////////////////////////////////////////
-#version 410
-
-#include <positionNormalTexture.glsl>
-
-in VertexToFragment vtf;
-
-out vec4 FragColor;
-
-uniform sampler2D texDiffuseMap;
-//uniform float g_worldEyePositon;
-
-void main()
-{
-	// ambient light
-	vec3 ambientMaterialColor = vec3(0.7, 0.7, 0.7);
-	float ambient = 0.3;
-	vec3 ambientLightIntensity = ambient * ambientMaterialColor;
-
-	// diffuse light
-	vec3 lightDirection = vec3(0.3, -1, -0.2);
-	vec3 light = normalize(-lightDirection); // points into directon of light
-	
-	float diffuse = max(0, dot( normalize(vtf.worldNormal), light));
-	vec3 diffuseMaterialColor = texture2D(texDiffuseMap, vtf.uv).xyz;
-	vec3 diffuseLightIntensity = diffuse * diffuseMaterialColor;
-
-	// specular
-	//vec3 eye = normalize( g_worldEyePositon - vtf.worldPosition);
-    //vec3 vhalf = normalize(light + eye);
-	//float specular = max(0, dot(normal, vhalf));
-	//float Shininess = 32.0;//g_Shininess.x;
-	//specular = pow(specular, Shininess);
-	//vec3 diffuseLightIntensity = specular*materialSpecularColor
-
-	// final
-	vec3 finalColor = ambientLightIntensity + diffuseLightIntensity;   
-
-	FragColor = vec4(finalColor.xyz, 1.0f);
-	//FragColor = vec4(vtf.worldNormal, 1.0f);
-}

boostFilesystemTest/src/Shader/positionNormalTextureTL.hlsl

-//////////////////////////////////////////////////////////////////////////////
-// Vertex Shader
-//////////////////////////////////////////////////////////////////////////////
-
-float4x4			WorldViewProjection;
-float4x4			WorldIT;
-
-//////////////////////////////////////////////////////////////////////////////
-struct ApplicationToVertex
-{
-	float3 position				: position;
-	float3 normal				: normal;
-	float2 uv				    : uv;
-};
-
-//////////////////////////////////////////////////////////////////////////////
-struct VertexToFragment
-{
-	float4 position				: SV_POSITION;
-	float3 worldNormal			: normal;
-	float2 uv				    : uv;
-};
-
-//////////////////////////////////////////////////////////////////////////////
-VertexToFragment VS_main (ApplicationToVertex app2vs)
-{
-	VertexToFragment vtf = (VertexToFragment)0;
-
-	vtf.position = mul(float4(app2vs.position.xyz, 1.0), WorldViewProjection);
-	vtf.worldNormal = mul(float4(app2vs.normal, 1.0), WorldIT).xyz;
-	vtf.uv = app2vs.uv;
-
-	return vtf;
-}
-
-//////////////////////////////////////////////////////////////////////////////
-// Pixel Shader
-//////////////////////////////////////////////////////////////////////////////
-
-SamplerState		samplerLinear;
-Texture2D<float4>	texDiffuseMap;
-
-struct FragmentToPixel
-{
-	float4 color				: SV_Target0;
-};
-
-FragmentToPixel PS_main (VertexToFragment vtf)
-{
-	FragmentToPixel final;
-
-	// ambient light
-	float3 ambientMaterialColor = float3(0.7, 0.7, 0.7);
-	float ambient = 0.3;
-	float3 ambientLightIntensity = ambient * ambientMaterialColor;
-	
-	// diffuse light
-	float3 lightDirection = float3(0.3, -1, -0.2);
-	float3 light = normalize(-lightDirection); // points into directon of light
-	
-	float diffuse = max(0, dot( normalize(vtf.worldNormal), light));
-	float3 diffuseMaterialColor = float4(texDiffuseMap.Sample(samplerLinear, float2(vtf.uv.x, vtf.uv.y), float2(0, 0)).xyz,1.0f);
-	float3 diffuseLightIntensity = diffuse * diffuseMaterialColor;
-
-	// final
-	float3 finalColor = ambientLightIntensity + diffuseLightIntensity;   
-
-	final.color = float4(finalColor, 1.0f);
-	//final.color = float4(vtf.worldNormal, 1.0f);
-
-	return final;
-}

boostFilesystemTest/src/Shader/positionNormalTextureTL.vert

-#version 410
-
-#include "positionNormalTexture.glsl"
-
-in ApplicationToVertex atv;
-out VertexToFragment vtf;
-
-// http://ogldev.tvcdev.net/www/tutorial25/tutorial25.html
-uniform mat4 World;		
-uniform mat4 WorldIT;				// inverse transposed	
-uniform mat4 WorldViewProjection;
-
-void main()
-{	
-	vtf.worldPosition = (World   * vec4( atv.position, 1.0)).xyz;
-	vtf.worldNormal   = (WorldIT * vec4( atv.normal,   1.0)).xyz;
-	vtf.uv            = atv.uv;
-
-	gl_Position = WorldViewProjection * vec4( atv.position, 1.0);
-}

boostFilesystemTest/src/Shader/positionTexture.glsl

-struct ApplicationToVertex
-{
-	vec3 position;
-	vec3 normal;
-	vec2 uv;
-};
-
-struct VertexToFragment
-{
-	vec3 worldPosition;
-	vec3 worldNormal;
-	vec2 uv;
-};

boostFilesystemTest/src/Shader/skyboxPT.frag

-#version 410
-
-#include <positionTexture.glsl>
-
-in VertexToFragment vtf;
-out vec4 FragColor;
-
-uniform samplerCube skyboxCubeMap;
-
-void main()
-{
-	// final
-	vec3 finalColor = texture(skyboxCubeMap, vtf.worldPosition).xyz;   
-
-	FragColor = vec4(finalColor.xyz, 1.0f);
-}

boostFilesystemTest/src/Shader/skyboxPT.hlsl

-//////////////////////////////////////////////////////////////////////////////
-// Vertex Shader
-//////////////////////////////////////////////////////////////////////////////
-
-float4x4			WorldViewProjection;
-float4x4			World;
-
-SamplerState		samplerTrilinear;
-TextureCube			texSkyCubeMap;
-
-//////////////////////////////////////////////////////////////////////////////
-struct ApplicationToVertex
-{
-	float3 position				: position;
-	float2 uv					: uv;
-};
-
-//////////////////////////////////////////////////////////////////////////////
-struct VertexToFragment
-{
-	float3 worldPosition		: position;
-	float2 uv					: uv;
-	float4 position				: SV_POSITION;
-};
-
-//////////////////////////////////////////////////////////////////////////////
-VertexToFragment VS_main (ApplicationToVertex app2vs)
-{
-	VertexToFragment vtf = (VertexToFragment)0;
-
-	vtf.worldPosition = mul(float4(app2vs.position.xyz, 1.0), World).xyz;
-	vtf.position = mul(float4(app2vs.position.xyz, 1.0), WorldViewProjection);
-	vtf.uv = app2vs.uv;
-
-	return vtf;
-}
-
-//////////////////////////////////////////////////////////////////////////////
-// Pixel Shader
-//////////////////////////////////////////////////////////////////////////////
-struct FragmentToPixel
-{
-	float4 color				: SV_Target0;
-};
-
-FragmentToPixel PS_main (VertexToFragment vtf, bool frontFace : SV_IsFrontFace)
-{
-	FragmentToPixel final;
-
-	final.color = float4( texSkyCubeMap.Sample(samplerTrilinear, vtf.worldPosition).xyz , 1.0f);
-
-	return final;
-}

boostFilesystemTest/src/Shader/skyboxPT.vert

-#version 410
-
-#include "positionTexture.glsl"
-
-in ApplicationToVertex atv;
-out VertexToFragment vtf;
-
-uniform mat4 World;		
-uniform mat4 WorldIT;				// inverse transposed	
-uniform mat4 WorldViewProjection;
-
-void main()
-{	
-	vtf.worldPosition = (World   * vec4( atv.position, 1.0)).xyz;
-	vtf.uv            = atv.uv;
-
-	gl_Position = WorldViewProjection * vec4( atv.position, 1.0);
-}