2024-12-03, 18:13 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
Pages: [1]
  Print  
Author Topic: tr_ Matrix help  (Read 7148 times)
0 Members and 1 Guest are viewing this topic.
leilei
 

Spectre
**
Posts: 39

OA lead

WWW
« on: 2016-03-27, 17:41 »

Hi

I like to toy with the renderer very much and currently i'm trying to implement a software tcGen of GL_EYE_LINEAR which would, in theory, map the UV's from the viewport's projection (which could make for nice fake framebuffer effects like refractions/reflections if gone a little further)

Only problem is i'm having trouble translating matrixes from the projection to the world.  Q3 doesn't come with much functions for matrix manipulation, and code on the internet to imitate GL_EYE_LINEAR (like for GLES) really calls for them.

I *could* DoTheRightThing and use a FBO...but i'm intentionally targeting the low end, the ~2000 target for technical and aesthetic reasons, among other plans like libretro. Slipgate - Smile

I was inspired by this which pulls off refraction by GL_EYE_LINEAR'ing a pass with a rendertotexture of the view before drawing the water. The reflection is a static cubemap and the ripples are the standard procedural heightmap though.
« Last Edit: 2016-03-27, 17:50 by leilei » Logged

Phoenix
Bird of Fire
 

Team Member
Elite (7.5k+)
*********
Posts: 8814

WWW
« Reply #1 on: 2016-03-27, 21:41 »

I wish I could help there, but I'm not very familiar with OpenGL commands, nor matrix calculations.  Vorlonesque is a lot more familiar with the engine.  I'll bug him on Steam sometime to see if he can provide some input.
Logged


I fly into the night, on wings of fire burning bright...
Pages: [1]
  Print  
 
Jump to: