Comments (1)
Current implementation uses glRead to compare the view depth to the view distance of the flare to decide if you should render the flare or not. glRead is a blocking command though, as it needs to sync the gpu and the cpu to get the current view depth.
I want to replace this with an additional flare visibility FBO with an attached 1D texture. The 1D textures width would be the number of flares of the current map.
This FBO will be updated every frame after the depth prepass. We can bind the depth buffer to a texture unit and test in a fragment shader if the flare would be visable or not. If the flare is not visable, write a value of 0.0, else add some_magic_value/frame_time. Could also extend the depth testing to multiple pixels to account for partial occlusion of the flares.
Finally, the flare could be rendered with the rendered flare visibility texture.
Atlasing all the flare images per map would also be nice, so we can render all flares with one draw command.
from openjk.
Related Issues (20)
- Glow textures disappear when using force push/pull HOT 1
- go deferred HOT 1
- MD3's do not animate - misc_model_breakable HOT 1
- Lightstyles are broken HOT 1
- Glow doesn't show when behind glass
- Deformable Snow/Sand
- Sprites
- Screen dissolve
- Ghoul2 marks HOT 1
- Fog volumes HOT 1
- Shaded materials with deformVertexes
- Add additional deluxemap loading HOT 1
- Cubemap parallax correction
- Couldn't compile shader, crash. Issues on AMD cards HOT 5
- MD3 tangent space missmatch when not Frame 0
- Error when hit 3PO in torso by saber
- rend2
- rend2 crashlog HOT 2
- Crash when loading hdr lightmaps HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openjk.