irrRenderer 1.0
-
- Posts: 57
- Joined: Sat Oct 11, 2014 11:07 pm
Re: irrRenderer 1.0
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
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:
And with near value 0.3, much better:
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
Here's what it looks like with near value 0.01, completely broken if you zoom out more:
And with near value 0.3, much better:
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
Re: irrRenderer 1.0
you need a logarithmic depth buffer, using the DEPTH32F format as storage
Re: irrRenderer 1.0
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
callback
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) ;
Code: Select all
viewMat = Smgr->getActiveCamera()->getViewMatrix();
viewMat.makeInverse();
services->setPixelShaderConstant("inverseView", (irr::f32*)&viewMat, 16);
Re: irrRenderer 1.0
Unless you know what you're doing, avoid using a Z near value under 1.0
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Re: irrRenderer 1.0
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
http://i65.tinypic.com/110hhu9.png
http://i64.tinypic.com/2ik312t.jpg
EDIT2: OK, solved. I was doing wrong the depthmap..... u.u"""""
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://i64.tinypic.com/2ik312t.jpg
EDIT2: OK, solved. I was doing wrong the depthmap..... u.u"""""
Re: irrRenderer 1.0
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..
any ideas or is this a bug?
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..
any ideas or is this a bug?
Re: irrRenderer 1.0
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).
Or give me the entire capture from RenderDoc (I just need 1 frame).
Re: irrRenderer 1.0
Thanks devsh. I'm not that familiar with RenderDoc, but this is what I'm getting..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).
Running Irrlicht 1.8 with this one.
Re: irrRenderer 1.0
ooops, only works in OpenGL core profile (irrlicht too old)...
Try codexl, nvidia graphics debugger, or similar (but not APItrace).
Try codexl, nvidia graphics debugger, or similar (but not APItrace).
Re: irrRenderer 1.0
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?
Re: irrRenderer 1.0
As far as I'm aware irrRenderer is not under active (or any kind of) development.