klepto2 Posted March 23 Share Posted March 23 Download: VolumetricLighting0_9_5.zip This is a small but powerful posteffect with "real" VolumetricLighting for all lighttypes. It shows some basic powerful features of the UltraEngine pipeline: Performance Accesibility (you can get nearly everything in a shader at every time) The shader itself features Volumetric lighting based on the included shadowmap lookups and performs some calculations more or less like the screenspace godrays, but not depenfing on the backbuffer colors, but real shadow casting. It also features calculates only 1/16th of a buffer (plus out of scope pixels) per frame and reprojects the result of the previous buffer if possible. The shader itself is currently more or less for demonstration usage only, because there are no volumetric settings for lights available and adding these would require some kind of lua or cpp backend. 4 1 Quote Windows 10 Pro 64-Bit-Version NVIDIA Geforce 1080 TI Link to comment Share on other sites More sharing options...
SpiderPig Posted March 23 Share Posted March 23 Great job! Looks amazing. I'll try this out in game very soon. Thanks! Quote Link to comment Share on other sites More sharing options...
SpiderPig Posted March 30 Share Posted March 30 I just tried this in game and it looks awesome, albeit a bit bright at the moment (might be my settings, not sure).\ Also it didn't work with the environment maps set. Should it work with this you think? auto specmap = LoadTexture("Materials/Environment/Default/specular.dds"); auto diffmap = LoadTexture("Materials/Environment/Default/diffuse.dds"); world->SetEnvironmentMap(specmap, ENVIRONMENTMAP_SPECULAR); world->SetEnvironmentMap(diffmap, ENVIRONMENTMAP_DIFFUSE); 2 Quote Link to comment Share on other sites More sharing options...
klepto2 Posted March 30 Author Share Posted March 30 You can try to change the exposure and gamma corection parameters in the fragment shader: const float G_SCATTERING_DEFAULT = 0.7f; const float G_SCATTERING_DIRECTIONAL = 0.1f; const float exposure = 20.0; const float gamma = 1.1; also the function writetopixel in the fragment shader (i added a return true for the editor): bool writeToPixel(vec2 fragCoord) { //return true; ivec2 iFragCoord = ivec2(fragCoord); uint index = CurrentFrame % BAYER_LIMIT; return (((iFragCoord.x + BAYER_LIMIT_H * iFragCoord.y) % BAYER_LIMIT) == bayerFilter_[index]); } comment it out to use the reprojection, should be a bit faster. 1 1 Quote Windows 10 Pro 64-Bit-Version NVIDIA Geforce 1080 TI Link to comment Share on other sites More sharing options...
klepto2 Posted March 30 Author Share Posted March 30 also it should work with the environemnt, it might be that it interfears with your atmosphere shader. it uses a sphere if i remember correctly. 1 Quote Windows 10 Pro 64-Bit-Version NVIDIA Geforce 1080 TI Link to comment Share on other sites More sharing options...
SpiderPig Posted March 30 Share Posted March 30 Yeah it's a sphere. I'm only setting the SPEC and DIFFUSE environments maps for now so it helps with the PBR lighting, not sure how the skydome is effecting that, I'll investigate! Quote Link to comment Share on other sites More sharing options...
Josh Posted April 15 Share Posted April 15 I think it might be a good idea to render point and spot lights in this manner using a sphere or cone mesh with a special shader. You would need the material set to use blending, and the mesh would have to reference the light it belongs to. That would save you from stepping through a lot of empty space. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.