Compare commits

..

1 Commits

Author SHA256 Message Date
4fce05a927 README.md aktualisiert 2026-04-11 07:53:19 +00:00
3 changed files with 385 additions and 404 deletions

View File

@@ -1,2 +1,5 @@
# TSE # TSE
packages needed for building under linux:
build-essential llvm cmake ninja-build clang mesa-common-dev gdb

View File

@@ -186,36 +186,14 @@ TSE::Matrix4x4 BuildView_Zplus_RH(const TSE::Matrix4x4& world)
void TSE::Camera::PreDraw(IShader *shader) void TSE::Camera::PreDraw(IShader *shader)
{ {
rt->Bind(); rt->Bind();
// shader->SetUniform("prMatrix", projectionMatrix); shader->SetUniform("prMatrix", projectionMatrix);
// auto worlmatrix = baseObject->GetGlobalMatrix(); auto worlmatrix = baseObject->GetGlobalMatrix();
// viewMatrix = BuildView_Zplus_RH(worlmatrix); viewMatrix = BuildView_Zplus_RH(worlmatrix);
// shader->SetUniform("camMatrix", &viewMatrix); shader->SetUniform("camMatrix", &viewMatrix);
// helper->OnRenderTargetChanged(lastRtSize.x, lastRtSize.y); helper->OnRenderTargetChanged(lastRtSize.x, lastRtSize.y);
Vector3 pos = baseObject->GetGlobalPosition();
Vector3 right = baseObject->LocalToGlobalPosition(Vector3::right) - pos;
Vector3 up = baseObject->LocalToGlobalPosition(Vector3::up) - pos;
Vector3 forward = baseObject->LocalToGlobalPosition(Vector3::forward) - pos;
forward.Normalize();
shader->SetUniform("CamPos", &pos);
shader->SetUniform("CamRight", &right);
shader->SetUniform("CamUp", &up);
shader->SetUniform("CamForward", &forward);
float x = lastRtSize.x / RenderScale;
float y = lastRtSize.y / RenderScale;
float mx = -x;
float my = -y;
shader->SetUniform("OrthoLeft", mx);
shader->SetUniform("OrthoRight", x);
shader->SetUniform("OrthoBottom", my);
shader->SetUniform("OrthoTop", y);
shader->SetUniform("NearPlane", nearClippingPlane);
shader->SetUniform("FarPlane", farClippingPlane);
} }
void TSE::Camera::PostDraw() void TSE::Camera::PostDraw()

View File

@@ -105,7 +105,7 @@ void TSE::OpenGL::TextureHelperOpenGL::Apply3D(VolumeTexture3D *tex)
{ {
if(tex->bpp() == 32) if(tex->bpp() == 32)
{ {
internal = GL_R16; internal = GL_RGBA;
input = GL_BGRA; input = GL_BGRA;
size = GL_UNSIGNED_BYTE; size = GL_UNSIGNED_BYTE;
} }
@@ -136,7 +136,7 @@ void TSE::OpenGL::TextureHelperOpenGL::Apply3D(VolumeTexture3D *tex)
); );
} }
//glGenerateMipmap(GL_TEXTURE_3D); glGenerateMipmap(GL_TEXTURE_3D);
glBindTexture(GL_TEXTURE_3D, 0); glBindTexture(GL_TEXTURE_3D, 0);
} }