Page 7 of 7

Re: irrRenderer 1.0

Posted: Tue Nov 03, 2015 8:47 am
by primem0ver
I was pointed to this project by someone answering a question I posted in the Advanced forum. My project needs to be able to dynamically use (or simulate using) an object as a light source. The discussion where I pose my "problem" is here. My current need for this is to create a sun that lights planets and other objects that circle it but since the project is a platform that uses plugins, I will eventually need be able to support other objects of various shapes and sizes as well. Would your irrRenderer make this possible? From the picture on the first page, your large lights on the wall appear to do something similar to what I have in mind. The light radiating from the source must also have the option to project light a very large distance (in the case of a solar system for example). I do not however want to use a collection of point lights. I have tried that in the past and it was completely unsuccessful in creating a realistic effect.

Re: irrRenderer 1.0

Posted: Mon May 09, 2016 9:26 pm
by Locien
Been making use of this super cool project because I'm making a block type game and want the ability to place many lights. So far I've had little problems and it's running great, actually I haven't noticed any drop in performance at all. There was one problem I had which was that some pixels would bleed through geometry apparently caused by floating point inaccuracy in static planes or "thin walls" as mentioned earlier in the thread. It can be fixed by increasing the near value though, changing the far value didn't change it at all for me.

Here's what it looks like with near value 0.01, completely broken if you zoom out more:
Image

And with near value 0.3, much better:
Image

Is there any way to fix this in the shader without having to change the near value or is this just one of the downsides of the implementation? Anyways, really cool stuff. I haven't checked out if the transparent materials work yet, but I will do so soon.

Oh and the reason why the depth looks funny in the screens is because I haven't cast any diffuse lights on the terrain. But I tested it and it works great :D

Re: irrRenderer 1.0

Posted: Thu May 12, 2016 8:23 am
by devsh
you need a logarithmic depth buffer, using the DEPTH32F format as storage

Re: irrRenderer 1.0

Posted: Mon Aug 08, 2016 6:22 am
by kinkreet
how can i transform the vPixelPos in to world space? I tryed to multiply by inverse view matrix, but when the camera rotates the worldpos "rotates" too.
GLSL

Code: Select all

 
         float vDepth = texture2D(DepthTex, ScreenPos.xy).r;
 
        //reconstruct view pixel position
        vec3 vProjPos = vec3(mix(FarLeftUp.x, FarRightUpX, ScreenPos.x),
                     mix(FarLeftDownY, FarLeftUp.y, ScreenPos.y),
                     FarLeftUp.z);
        vec3 vPixelPos = vec3(vProjPos * vDepth);
 
        vec4 worldpos = inverseView * vec4(vPixelPos, 1.0) ;
 
 
callback

Code: Select all

 
        viewMat = Smgr->getActiveCamera()->getViewMatrix();
        viewMat.makeInverse();
        services->setPixelShaderConstant("inverseView", (irr::f32*)&viewMat, 16);
 

Re: irrRenderer 1.0

Posted: Thu Aug 11, 2016 11:43 am
by Mel
Unless you know what you're doing, avoid using a Z near value under 1.0

Re: irrRenderer 1.0

Posted: Thu Aug 11, 2016 6:02 pm
by kinkreet
It seems to work, but is not solved yet. I'm using the world position for shadow mapping and paint the water.

EDIT:It's like if the camera position was displaced

Code: Select all

 
//its simple
if( world.y < waterlevel) gl_FragColor = vec4(gl_FragColor.rgb * watercolor, 1.0);
http://i65.tinypic.com/110hhu9.png
http://i64.tinypic.com/2ik312t.jpg

EDIT2: OK, solved. I was doing wrong the depthmap..... u.u"""""

Re: irrRenderer 1.0

Posted: Fri May 11, 2018 2:13 am
by noretsar
Thanks for this.. irrRenderer works ok, at least with poinlights from the demo, anyone tried with Directional Lighting?

With Directional Light, Normal map does not work (flicker on some angles) and Parallax mapping seems to be ok, but I'm getting some artifacts like this..

Image

any ideas or is this a bug?

Re: irrRenderer 1.0

Posted: Fri May 11, 2018 8:44 am
by devsh
Install RenderDoc and show me the shader for the parallax and the deferred.

Or give me the entire capture from RenderDoc (I just need 1 frame).

Re: irrRenderer 1.0

Posted: Mon May 14, 2018 1:42 am
by noretsar
devsh wrote:Install RenderDoc and show me the shader for the parallax and the deferred.

Or give me the entire capture from RenderDoc (I just need 1 frame).
Thanks devsh. I'm not that familiar with RenderDoc, but this is what I'm getting..

Image

Running Irrlicht 1.8 with this one.

Re: irrRenderer 1.0

Posted: Mon May 14, 2018 11:49 am
by devsh
ooops, only works in OpenGL core profile (irrlicht too old)... :(


Try codexl, nvidia graphics debugger, or similar (but not APItrace).

Re: irrRenderer 1.0

Posted: Mon May 14, 2018 1:28 pm
by noretsar
I see. I'm now actually thinking twice about using this anyway since it messes up with Irrlicht's AA, which I'm more in favor of.. still a good option when this is fixed, perhaps I'm using an outdated version? :oops:

Re: irrRenderer 1.0

Posted: Mon May 14, 2018 4:38 pm
by devsh
As far as I'm aware irrRenderer is not under active (or any kind of) development.