Finally completed frame buffer

This commit is contained in:
Vladislav Khorev 2024-06-09 10:38:02 +03:00
parent 4ae5adaeff
commit d2a081588f
5 changed files with 170 additions and 124 deletions

View File

@ -1,139 +1,139 @@
2024-Jun-09 01:35:24: Log started
2024-Jun-09 01:35:24: OpenGL Window created
2024-Jun-09 01:35:24: Script manager ready
2024-Jun-09 01:35:24: Render::OpenGL glVersion = 4.6.0 - Build 31.0.101.4887
2024-Jun-09 01:35:24: Render::OpenGL glVersion above 2.0 ok
2024-Jun-09 01:35:24: Render::OpenGL GL_ARB_framebuffer_object supported ok
2024-Jun-09 01:35:24: Render::OpenGL GL_ARB_uniform_buffer_object supported ok
2024-Jun-09 01:35:24: Prepare to add shader GUI
2024-Jun-09 01:35:24: ResourceManager::ShaderManager::Shader WARNING: 0:1: '' : #version directive missing
2024-Jun-09 10:36:12: Log started
2024-Jun-09 10:36:13: OpenGL Window created
2024-Jun-09 10:36:13: Script manager ready
2024-Jun-09 10:36:13: Render::OpenGL glVersion = 4.6.0 - Build 31.0.101.4887
2024-Jun-09 10:36:13: Render::OpenGL glVersion above 2.0 ok
2024-Jun-09 10:36:13: Render::OpenGL GL_ARB_framebuffer_object supported ok
2024-Jun-09 10:36:13: Render::OpenGL GL_ARB_uniform_buffer_object supported ok
2024-Jun-09 10:36:13: Prepare to add shader GUI
2024-Jun-09 10:36:13: ResourceManager::ShaderManager::Shader WARNING: 0:1: '' : #version directive missing
2024-Jun-09 01:35:24: ResourceManager::ShaderManager::Shader WARNING: 0:1: '' : #version directive missing
2024-Jun-09 10:36:13: ResourceManager::ShaderManager::Shader WARNING: 0:1: '' : #version directive missing
2024-Jun-09 01:35:24: Shader program is - 3
2024-Jun-09 01:35:24: ResourceManager::ShaderManager::Shader
2024-Jun-09 01:35:24: ResourceManager::ShaderManager shader loaded: GUI
2024-Jun-09 01:35:24: Prepare to add shader Parallax
2024-Jun-09 01:35:24: ResourceManager::ShaderManager::Shader WARNING: 0:1: '' : #version directive missing
2024-Jun-09 10:36:13: Shader program is - 3
2024-Jun-09 10:36:13: ResourceManager::ShaderManager::Shader
2024-Jun-09 10:36:13: ResourceManager::ShaderManager shader loaded: GUI
2024-Jun-09 10:36:13: Prepare to add shader Parallax
2024-Jun-09 10:36:13: ResourceManager::ShaderManager::Shader WARNING: 0:1: '' : #version directive missing
2024-Jun-09 01:35:24: ResourceManager::ShaderManager::Shader WARNING: 0:1: '' : #version directive missing
2024-Jun-09 10:36:13: ResourceManager::ShaderManager::Shader WARNING: 0:1: '' : #version directive missing
WARNING: 0:27: 'assign' : implicit type conversion allowed from GLSL 1.20
WARNING: 0:27: 'assign' : implicit type conversion allowed from GLSL 1.20
WARNING: 0:27: 'assign' : implicit type conversion allowed
2024-Jun-09 01:35:24: Shader program is - 6
2024-Jun-09 01:35:24: ResourceManager::ShaderManager::Shader
2024-Jun-09 01:35:24: ResourceManager::ShaderManager shader loaded: Parallax
2024-Jun-09 01:35:24: Prepare to add shader Directlight
2024-Jun-09 01:35:24: ResourceManager::ShaderManager::Shader WARNING: 0:1: '' : #version directive missing
2024-Jun-09 10:36:13: Shader program is - 6
2024-Jun-09 10:36:13: ResourceManager::ShaderManager::Shader
2024-Jun-09 10:36:13: ResourceManager::ShaderManager shader loaded: Parallax
2024-Jun-09 10:36:13: Prepare to add shader Directlight
2024-Jun-09 10:36:13: ResourceManager::ShaderManager::Shader WARNING: 0:1: '' : #version directive missing
2024-Jun-09 01:35:24: ResourceManager::ShaderManager::Shader WARNING: 0:1: '' : #version directive missing
2024-Jun-09 10:36:13: ResourceManager::ShaderManager::Shader WARNING: 0:1: '' : #version directive missing
2024-Jun-09 01:35:24: Shader program is - 9
2024-Jun-09 01:35:24: ResourceManager::ShaderManager::Shader
2024-Jun-09 01:35:24: ResourceManager::ShaderManager shader loaded: Directlight
2024-Jun-09 01:35:24: Prepare to add shader Env
2024-Jun-09 01:35:24: ResourceManager::ShaderManager::Shader WARNING: 0:1: '' : #version directive missing
2024-Jun-09 10:36:13: Shader program is - 9
2024-Jun-09 10:36:13: ResourceManager::ShaderManager::Shader
2024-Jun-09 10:36:13: ResourceManager::ShaderManager shader loaded: Directlight
2024-Jun-09 10:36:13: Prepare to add shader Env
2024-Jun-09 10:36:13: ResourceManager::ShaderManager::Shader WARNING: 0:1: '' : #version directive missing
2024-Jun-09 01:35:24: ResourceManager::ShaderManager::Shader WARNING: 0:1: '' : #version directive missing
2024-Jun-09 10:36:13: ResourceManager::ShaderManager::Shader WARNING: 0:1: '' : #version directive missing
2024-Jun-09 01:35:24: Shader program is - 12
2024-Jun-09 01:35:24: ResourceManager::ShaderManager::Shader
2024-Jun-09 01:35:24: ResourceManager::ShaderManager shader loaded: Env
2024-Jun-09 01:35:24: Prepare to add shader EnvReverse
2024-Jun-09 01:35:24: ResourceManager::ShaderManager::Shader WARNING: 0:1: '' : #version directive missing
2024-Jun-09 10:36:13: Shader program is - 12
2024-Jun-09 10:36:13: ResourceManager::ShaderManager::Shader
2024-Jun-09 10:36:13: ResourceManager::ShaderManager shader loaded: Env
2024-Jun-09 10:36:13: Prepare to add shader EnvReverse
2024-Jun-09 10:36:13: ResourceManager::ShaderManager::Shader WARNING: 0:1: '' : #version directive missing
2024-Jun-09 01:35:24: ResourceManager::ShaderManager::Shader WARNING: 0:1: '' : #version directive missing
2024-Jun-09 10:36:13: ResourceManager::ShaderManager::Shader WARNING: 0:1: '' : #version directive missing
2024-Jun-09 01:35:24: Shader program is - 15
2024-Jun-09 01:35:24: ResourceManager::ShaderManager::Shader
2024-Jun-09 01:35:24: ResourceManager::ShaderManager shader loaded: EnvReverse
2024-Jun-09 01:35:24: Prepare to add shader Water
2024-Jun-09 01:35:24: ResourceManager::ShaderManager::Shader WARNING: 0:1: '' : #version directive missing
2024-Jun-09 10:36:13: Shader program is - 15
2024-Jun-09 10:36:13: ResourceManager::ShaderManager::Shader
2024-Jun-09 10:36:13: ResourceManager::ShaderManager shader loaded: EnvReverse
2024-Jun-09 10:36:13: Prepare to add shader Water
2024-Jun-09 10:36:13: ResourceManager::ShaderManager::Shader WARNING: 0:1: '' : #version directive missing
2024-Jun-09 01:35:24: ResourceManager::ShaderManager::Shader WARNING: 0:1: '' : #version directive missing
2024-Jun-09 10:36:13: ResourceManager::ShaderManager::Shader WARNING: 0:1: '' : #version directive missing
WARNING: 0:29: 'assign' : implicit type conversion allowed from GLSL 1.20
2024-Jun-09 01:35:24: Shader program is - 18
2024-Jun-09 01:35:24: ResourceManager::ShaderManager::Shader
2024-Jun-09 01:35:24: ResourceManager::ShaderManager shader loaded: Water
2024-Jun-09 01:35:24: Prepare to add shader Frame
2024-Jun-09 01:35:24: ResourceManager::ShaderManager::Shader WARNING: 0:1: '' : #version directive missing
2024-Jun-09 10:36:13: Shader program is - 18
2024-Jun-09 10:36:13: ResourceManager::ShaderManager::Shader
2024-Jun-09 10:36:13: ResourceManager::ShaderManager shader loaded: Water
2024-Jun-09 10:36:13: Prepare to add shader Frame
2024-Jun-09 10:36:13: ResourceManager::ShaderManager::Shader WARNING: 0:1: '' : #version directive missing
2024-Jun-09 01:35:24: ResourceManager::ShaderManager::Shader WARNING: 0:1: '' : #version directive missing
2024-Jun-09 10:36:13: ResourceManager::ShaderManager::Shader WARNING: 0:1: '' : #version directive missing
2024-Jun-09 01:35:24: Shader program is - 21
2024-Jun-09 01:35:24: ResourceManager::ShaderManager::Shader
2024-Jun-09 01:35:24: ResourceManager::ShaderManager shader loaded: Frame
2024-Jun-09 01:35:24: Prepare to add shader Lightview
2024-Jun-09 01:35:24: ResourceManager::ShaderManager::Shader WARNING: 0:5: '' : #version directive missing
2024-Jun-09 10:36:13: Shader program is - 21
2024-Jun-09 10:36:13: ResourceManager::ShaderManager::Shader
2024-Jun-09 10:36:13: ResourceManager::ShaderManager shader loaded: Frame
2024-Jun-09 10:36:13: Prepare to add shader Lightview
2024-Jun-09 10:36:13: ResourceManager::ShaderManager::Shader WARNING: 0:5: '' : #version directive missing
2024-Jun-09 01:35:24: ResourceManager::ShaderManager::Shader WARNING: 0:1: '' : #version directive missing
2024-Jun-09 10:36:13: ResourceManager::ShaderManager::Shader WARNING: 0:1: '' : #version directive missing
2024-Jun-09 01:35:24: Shader program is - 24
2024-Jun-09 01:35:24: ResourceManager::ShaderManager::Shader
2024-Jun-09 01:35:24: ResourceManager::ShaderManager shader loaded: Lightview
2024-Jun-09 01:35:24: Prepare to add shader Simple3D
2024-Jun-09 01:35:24: ResourceManager::ShaderManager::Shader WARNING: 0:1: '' : #version directive missing
2024-Jun-09 10:36:13: Shader program is - 24
2024-Jun-09 10:36:13: ResourceManager::ShaderManager::Shader
2024-Jun-09 10:36:13: ResourceManager::ShaderManager shader loaded: Lightview
2024-Jun-09 10:36:13: Prepare to add shader Simple3D
2024-Jun-09 10:36:13: ResourceManager::ShaderManager::Shader WARNING: 0:1: '' : #version directive missing
2024-Jun-09 01:35:24: ResourceManager::ShaderManager::Shader WARNING: 0:1: '' : #version directive missing
2024-Jun-09 10:36:13: ResourceManager::ShaderManager::Shader WARNING: 0:1: '' : #version directive missing
2024-Jun-09 01:35:24: Shader program is - 27
2024-Jun-09 01:35:24: ResourceManager::ShaderManager::Shader
2024-Jun-09 01:35:24: ResourceManager::ShaderManager shader loaded: Simple3D
2024-Jun-09 01:35:24: ResourceManager::TexList Texture added: bt_box_yellow.bmp with id = 1
2024-Jun-09 01:35:24: ResourceManager::TexList Texture added: bt_box_norm.bmp32 with id = 2
2024-Jun-09 01:35:24: Lite model added successfully: models/bt_box_yellow.lm1
2024-Jun-09 01:35:24: ResourceManager::TexList Texture added: bt_box_red000.bmp with id = 3
2024-Jun-09 01:35:24: ResourceManager::TexList Texture reference added: bt_box_norm.bmp32
2024-Jun-09 01:35:24: Lite model added successfully: models/bt_box_red.lm1
2024-Jun-09 01:35:24: ResourceManager::TexList Texture added: bt_box_blue00.bmp with id = 4
2024-Jun-09 01:35:24: ResourceManager::TexList Texture reference added: bt_box_norm.bmp32
2024-Jun-09 01:35:24: Lite model added successfully: models/bt_box_blue.lm1
2024-Jun-09 01:35:24: ResourceManager::TexList Texture added: bt_cone.bmp with id = 5
2024-Jun-09 01:35:24: Lite model added successfully: models/bt_cone.lm1
2024-Jun-09 01:35:24: Lite model added successfully: models/girl.lm1
2024-Jun-09 01:35:25: Lite model added successfully: models/bonemodel.lm1
2024-Jun-09 01:35:26: ResourceManager::TexList Texture added: out.bmp with id = 6
2024-Jun-09 01:35:26: FrameManager:: frame buffer added: Skybox
2024-Jun-09 01:35:26: ResourceManager::TexList Texture added: normalmap.bmp with id = 8
2024-Jun-09 01:35:26: Going to add texture: C:\Work\OldProjects\ho3\resources\../resources/sky/posx.bmp
2024-Jun-09 01:35:26: Going to add texture: C:\Work\OldProjects\ho3\resources\../resources/sky/negx.bmp
2024-Jun-09 01:35:26: Going to add texture: C:\Work\OldProjects\ho3\resources\../resources/sky/posy.bmp
2024-Jun-09 01:35:26: Going to add texture: C:\Work\OldProjects\ho3\resources\../resources/sky/negy.bmp
2024-Jun-09 01:35:26: Going to add texture: C:\Work\OldProjects\ho3\resources\../resources/sky/posz.bmp
2024-Jun-09 01:35:26: Going to add texture: C:\Work\OldProjects\ho3\resources\../resources/sky/negz.bmp
2024-Jun-09 01:35:26: ResourceManager::TexList texture added succesfuly: posx.bmp
2024-Jun-09 01:35:26: Going to add texture: C:\Work\OldProjects\ho3\resources\../resources/sky/yavin_rt.bmp
2024-Jun-09 01:35:26: Going to add texture: C:\Work\OldProjects\ho3\resources\../resources/sky/yavin_lf.bmp
2024-Jun-09 01:35:26: Going to add texture: C:\Work\OldProjects\ho3\resources\../resources/sky/yavin_dn.bmp
2024-Jun-09 01:35:26: Going to add texture: C:\Work\OldProjects\ho3\resources\../resources/sky/yavin_up.bmp
2024-Jun-09 01:35:26: Going to add texture: C:\Work\OldProjects\ho3\resources\../resources/sky/yavin_bk.bmp
2024-Jun-09 01:35:27: Going to add texture: C:\Work\OldProjects\ho3\resources\../resources/sky/yavin_ft.bmp
2024-Jun-09 01:35:27: ResourceManager::TexList texture added succesfuly: yavin_rt.bmp
2024-Jun-09 01:35:27: Going to add texture: C:\Work\OldProjects\ho3\resources\../resources/sky/space_rt.bmp
2024-Jun-09 01:35:27: Going to add texture: C:\Work\OldProjects\ho3\resources\../resources/sky/space_lf.bmp
2024-Jun-09 01:35:27: Going to add texture: C:\Work\OldProjects\ho3\resources\../resources/sky/space_up.bmp
2024-Jun-09 01:35:27: Going to add texture: C:\Work\OldProjects\ho3\resources\../resources/sky/space_dn.bmp
2024-Jun-09 01:35:27: Going to add texture: C:\Work\OldProjects\ho3\resources\../resources/sky/space_bk.bmp
2024-Jun-09 01:35:27: Going to add texture: C:\Work\OldProjects\ho3\resources\../resources/sky/space_ft.bmp
2024-Jun-09 01:35:27: ResourceManager::TexList texture added succesfuly: space_rt.bmp
2024-Jun-09 01:35:27: FrameManager:: frame buffer added: ScreenBlur
2024-Jun-09 01:35:27: FrameManager:: frame buffer added: ShadowBufferGlobal
2024-Jun-09 01:35:27: FrameManager:: frame buffer added: ShadowBufferLocal
2024-Jun-09 10:36:13: Shader program is - 27
2024-Jun-09 10:36:13: ResourceManager::ShaderManager::Shader
2024-Jun-09 10:36:13: ResourceManager::ShaderManager shader loaded: Simple3D
2024-Jun-09 10:36:13: ResourceManager::TexList Texture added: bt_box_yellow.bmp with id = 1
2024-Jun-09 10:36:13: ResourceManager::TexList Texture added: bt_box_norm.bmp32 with id = 2
2024-Jun-09 10:36:13: Lite model added successfully: models/bt_box_yellow.lm1
2024-Jun-09 10:36:13: ResourceManager::TexList Texture added: bt_box_red000.bmp with id = 3
2024-Jun-09 10:36:13: ResourceManager::TexList Texture reference added: bt_box_norm.bmp32
2024-Jun-09 10:36:13: Lite model added successfully: models/bt_box_red.lm1
2024-Jun-09 10:36:13: ResourceManager::TexList Texture added: bt_box_blue00.bmp with id = 4
2024-Jun-09 10:36:13: ResourceManager::TexList Texture reference added: bt_box_norm.bmp32
2024-Jun-09 10:36:13: Lite model added successfully: models/bt_box_blue.lm1
2024-Jun-09 10:36:13: ResourceManager::TexList Texture added: bt_cone.bmp with id = 5
2024-Jun-09 10:36:13: Lite model added successfully: models/bt_cone.lm1
2024-Jun-09 10:36:13: Lite model added successfully: models/girl.lm1
2024-Jun-09 10:36:14: Lite model added successfully: models/bonemodel.lm1
2024-Jun-09 10:36:16: ResourceManager::TexList Texture added: out.bmp with id = 6
2024-Jun-09 10:36:16: FrameManager:: frame buffer added: Skybox
2024-Jun-09 10:36:16: ResourceManager::TexList Texture added: normalmap.bmp with id = 8
2024-Jun-09 10:36:16: Going to add texture: C:\Work\OldProjects\ho3\resources\../resources/sky/posx.bmp
2024-Jun-09 10:36:16: Going to add texture: C:\Work\OldProjects\ho3\resources\../resources/sky/negx.bmp
2024-Jun-09 10:36:17: Going to add texture: C:\Work\OldProjects\ho3\resources\../resources/sky/posy.bmp
2024-Jun-09 10:36:17: Going to add texture: C:\Work\OldProjects\ho3\resources\../resources/sky/negy.bmp
2024-Jun-09 10:36:17: Going to add texture: C:\Work\OldProjects\ho3\resources\../resources/sky/posz.bmp
2024-Jun-09 10:36:17: Going to add texture: C:\Work\OldProjects\ho3\resources\../resources/sky/negz.bmp
2024-Jun-09 10:36:17: ResourceManager::TexList texture added succesfuly: posx.bmp
2024-Jun-09 10:36:17: Going to add texture: C:\Work\OldProjects\ho3\resources\../resources/sky/yavin_rt.bmp
2024-Jun-09 10:36:17: Going to add texture: C:\Work\OldProjects\ho3\resources\../resources/sky/yavin_lf.bmp
2024-Jun-09 10:36:17: Going to add texture: C:\Work\OldProjects\ho3\resources\../resources/sky/yavin_dn.bmp
2024-Jun-09 10:36:17: Going to add texture: C:\Work\OldProjects\ho3\resources\../resources/sky/yavin_up.bmp
2024-Jun-09 10:36:18: Going to add texture: C:\Work\OldProjects\ho3\resources\../resources/sky/yavin_bk.bmp
2024-Jun-09 10:36:18: Going to add texture: C:\Work\OldProjects\ho3\resources\../resources/sky/yavin_ft.bmp
2024-Jun-09 10:36:18: ResourceManager::TexList texture added succesfuly: yavin_rt.bmp
2024-Jun-09 10:36:18: Going to add texture: C:\Work\OldProjects\ho3\resources\../resources/sky/space_rt.bmp
2024-Jun-09 10:36:18: Going to add texture: C:\Work\OldProjects\ho3\resources\../resources/sky/space_lf.bmp
2024-Jun-09 10:36:19: Going to add texture: C:\Work\OldProjects\ho3\resources\../resources/sky/space_up.bmp
2024-Jun-09 10:36:19: Going to add texture: C:\Work\OldProjects\ho3\resources\../resources/sky/space_dn.bmp
2024-Jun-09 10:36:19: Going to add texture: C:\Work\OldProjects\ho3\resources\../resources/sky/space_bk.bmp
2024-Jun-09 10:36:19: Going to add texture: C:\Work\OldProjects\ho3\resources\../resources/sky/space_ft.bmp
2024-Jun-09 10:36:20: ResourceManager::TexList texture added succesfuly: space_rt.bmp
2024-Jun-09 10:36:20: FrameManager:: frame buffer added: ScreenBlur
2024-Jun-09 10:36:20: FrameManager:: frame buffer added: ShadowBufferGlobal
2024-Jun-09 10:36:20: FrameManager:: frame buffer added: ShadowBufferLocal

View File

@ -160,6 +160,11 @@ void TMyApplication::DrawCubemapDay()
Renderer->PopShader();
}
void TMyApplication::DrawFrameFullScreen()
{
}
//What to do on init
void TMyApplication::InnerInit()
{
@ -394,6 +399,24 @@ void TMyApplication::InnerInit()
waterVertexDataStruct.TexCoordData.push_back({ 2.0, 2.0 });
waterVertexDataStruct.TexCoordData.push_back({ 0.0, 2.0 });
waterVertexDataStruct.RefreshVBO();
frameVertexDataStruct.PositionData.push_back({ 0, 0, 0 });
frameVertexDataStruct.PositionData.push_back({ 800, 0, 0});
frameVertexDataStruct.PositionData.push_back({800, 600, 0 });
frameVertexDataStruct.PositionData.push_back({ 0, 0, 0 });
frameVertexDataStruct.PositionData.push_back({ 800, 600, 0 });
frameVertexDataStruct.PositionData.push_back({ 0, 600, 0 });
frameVertexDataStruct.TexCoordData.push_back({ 0.0, 0.0 });
frameVertexDataStruct.TexCoordData.push_back({ 1.0, 0.0 });
frameVertexDataStruct.TexCoordData.push_back({ 1.0, 1.0 });
frameVertexDataStruct.TexCoordData.push_back({ 0.0, 0.0 });
frameVertexDataStruct.TexCoordData.push_back({ 1.0, 1.0 });
frameVertexDataStruct.TexCoordData.push_back({ 0.0, 1.0 });
frameVertexDataStruct.RefreshVBO();
}
@ -417,32 +440,41 @@ void TMyApplication::InnerDraw()
DrawToCubemap();
//Renderer->SwitchToCubemapBuffer("Skybox", 0);
//Renderer->SetGlPosXView();
Renderer->SwitchToFrameBuffer(std::string("ScreenBlur"));
DrawSceneWithoutWater();
//DrawCubemap();
/*
if (view % 3 == 0)
{
//DrawCubemap();
Renderer->SetGlPosXView();
DrawSceneWithoutWater();
}
else if (view % 3 == 1)
{
DrawCubemap();
}
else
{
DrawSceneWithoutWater();
}*/
Renderer->PopShader();
DrawWaterSurface();
Renderer->SwitchToScreen();
glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
Renderer->PushShader("Frame");
Renderer->PushProjectionMatrix(800, 600);
Renderer->LoadIdentity();
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, ResourceManager->FrameManager.GetFrameTexture("ScreenBlur"));
RenderUniformMatrix3fv(CONST_STRING_MODELROTATEMATRIX_UNIFORM, false, (float*)IdentityMatrix.m);
RenderUniform3fv(CONST_STRING_MODELTRANSLATEVECTOR_UNIFORM, (float*)ZeroVec3.v);
EnableVertexAttribArray("vPosition");
EnableVertexAttribArray("vTexCoord");
DrawVertexDataStruct(frameVertexDataStruct);
DisableVertexAttribArray("vPosition");
DisableVertexAttribArray("vTexCoord");
Renderer->PopProjectionMatrix();
Renderer->PopShader();
DrawWaterSurface();
/*

View File

@ -41,12 +41,14 @@ class TMyApplication : public SE::TApplication
void DrawCubemap();
void DrawCubemapDay();
void DrawFrameFullScreen();
cardinal cubemapTexture;
cardinal cubemapTextureDay;
cardinal cubemapTextureNight;
VertexDataStruct cubemapVertexDataStruct;
VertexDataStruct waterVertexDataStruct;
VertexDataStruct frameVertexDataStruct;
public:
//Constructor

View File

@ -5,6 +5,7 @@ varying vec2 texCoord;
void main()
{
float xstep = 0.5f/800.0f;
float ystep = 0.5f/600.0f;
@ -20,4 +21,6 @@ void main()
+ vec4(texture2D(Texture, vec2(texCoord.x+2.0*xstep, texCoord.y)).rgb,1.0) * 0.1;
gl_FragColor = texColor;
//gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
}

View File

@ -1,7 +1,16 @@
attribute vec3 vPosition;
attribute vec2 vTexCoord;
uniform mat4 ProjectionMatrix;
uniform mat3 ModelRotateMatrix;
uniform vec3 ModelTranslateVector;
varying vec2 texCoord;
void main()
{
gl_Position = ftransform();
texCoord = gl_MultiTexCoord0.st;
vec4 realVertexPos = vec4(ModelRotateMatrix * vPosition.xyz + ModelTranslateVector, 1.0);
gl_Position = ProjectionMatrix * realVertexPos;
texCoord = vTexCoord.st;
}