Page 6 of 6

problem downloading

Posted: Sun Jan 03, 2010 10:14 pm
by halplus
I don't know if this forum is moderated but i do not see previous message. We are getting trouble downloading from RapidShare with slots full. You can try freehostia or www.000webhost.com. Thanks

Posted: Sat Jan 09, 2010 12:11 pm
by gingerheadman
I just tried this out with Irrlicht 1.6 and ran into some problems compiling.

Anyone else who can't compile the examples with Irrlicht 1.6, just change

Code: Select all

      rt0 = driver->createRenderTargetTexture(core::dimension2d<s32>(sizeW,sizeH));
      Material.Wireframe = false;
      Material.Lighting = false;
      Material.Textures[0]=rt0;
to

Code: Select all

      rt0 = driver->addRenderTargetTexture(core::dimension2d<u32>(sizeW,sizeH));
      Material.Wireframe = false;
      Material.Lighting = false;
      Material.setTexture(0,rt0);
and

Code: Select all

createDevice(video::EDT_OPENGL, core::dimension2d<s32>(1024, 768),	16, false, false);
to

Code: Select all

createDevice(video::EDT_OPENGL, core::dimension2d<u32>(1024, 768),16, false, false);

Posted: Sat May 15, 2010 6:42 pm
by Aptos
I'm having an issue where my game GUI is being drawn upside-down after rendering the Radial Blur.

Code: Select all

driver->setRenderTarget(blur->rt0, true, true, SColor(0,0,0,0));
smgr->drawAll();
driver->setRenderTarget(0);
blur->render();
env->drawAll(); //env is the GUI environment
I thought it might be the setTransformation() call within the render() function, but setting the driver's transformation back to the identity didn't help.

Thoughts/Solutions?

Thanks in advance.

EDIT: I should note that I don't want the radial blur applied to the GUI.

Posted: Sun May 16, 2010 6:15 pm
by arnir
is anyway how to change blur value in runtime?

Posted: Sun May 16, 2010 6:29 pm
by ent1ty
Use shader callback, and store blur value in it

this what I use for skydome, but it should get you going

Code: Select all

class ISkyShaderConstantSetCallBack : public IShaderConstantSetCallBack
{
public:
  virtual void OnSetConstants(IMaterialRendererServices* services, s32 userData)
  {
    services->setPixelShaderConstant("colorMulty", (float*)(&colorMulty), 1);
  }
  float colorMulty;
};
and on runtime just change ISkyShaderConstantSetCallBack::colorMulty

Posted: Sun May 16, 2010 7:26 pm
by Midnight
it's all well and good that you said it's free, but that really doesn't define a license and it appeared you were even speaking to a specific person.

anyone in their right mind wouldn't use this code without you actually claiming a legally recognized license... "go ahead" simply isn't good enough, especially after quoting someone specific.

I'm sure many would be happy to assist you if you require it. But you seem like a smart enough person, which leaves me rather confused.

Oh and they are beautiful btw, nice work!

Posted: Wed May 19, 2010 10:44 pm
by Aptos
Aptos wrote:I'm having an issue where my game GUI is being drawn upside-down after rendering the Radial Blur.

Code: Select all

driver->setRenderTarget(blur->rt0, true, true, SColor(0,0,0,0));
smgr->drawAll();
driver->setRenderTarget(0);
blur->render();
env->drawAll(); //env is the GUI environment
I thought it might be the setTransformation() call within the render() function, but setting the driver's transformation back to the identity didn't help.

Thoughts/Solutions?

Thanks in advance.

EDIT: I should note that I don't want the radial blur applied to the GUI.
Anyone have any ideas?

Posted: Wed Oct 06, 2010 8:50 pm
by grumpymonkey
Aptos wrote:
Aptos wrote:I'm having an issue where my game GUI is being drawn upside-down after rendering the Radial Blur.

Code: Select all

driver->setRenderTarget(blur->rt0, true, true, SColor(0,0,0,0));
smgr->drawAll();
driver->setRenderTarget(0);
blur->render();
env->drawAll(); //env is the GUI environment
I thought it might be the setTransformation() call within the render() function, but setting the driver's transformation back to the identity didn't help.

Thoughts/Solutions?

Thanks in advance.

EDIT: I should note that I don't want the radial blur applied to the GUI.
Anyone have any ideas?
I'm having this same issue using the bloom shader. Do you think it might be a problem with the Irrlicht version? I tried rendering the gui to a different texture and then drawing the texture with driver->draw2DImage but the same thing keeps happening >.<

Re: TGMs Shader Package[C++/GLSL]

Posted: Fri Aug 12, 2011 12:05 pm
by arnir
Is any way how can I get blur effect with only one setRenderTarget() call?

Re: TGMs Shader Package[C++/GLSL]

Posted: Mon Apr 09, 2012 1:07 pm
by maagi
Radial blur is awesome thx! :D
Change the line 95: " avg /= 11.0;" -> " avg /= 1.0;" to get more intensity like this

Image

Re: TGMs Shader Package[C++/GLSL]

Posted: Wed May 16, 2012 2:14 am
by Sidar
Sorry for necro-raiding this topic. But the examples that are given are all working within the main.
How will, for example, the bloom shader work if don't want to call the setRenderTarget in the "main loop"?
How will I go about adding the IPostProcessBloom to individual objects?

Re: TGMs Shader Package[C++/GLSL]

Posted: Fri May 18, 2012 8:56 am
by REDDemon
you should create a postprocessing manager wich can do the "setRenderTarget" for you in the main loop and then pass references/pointers to your code. Keep it simple and it will work.

Nice the Lava shader, didn't noticed it before. Very good looking.

Re: TGMs Shader Package[C++/GLSL]

Posted: Fri May 18, 2012 4:24 pm
by Sidar
I actually took the different route and just create the callbacks seperately And load them from a file.

in my sphere object:
//ApplyShader
//_______________________________________________________________________
irr::io::path frag = "assets/shaders/Inferno.frag";
irr::io::path vert = "assets/shaders/Inferno.vert";

IGPUProgrammingServices* gpu = SceneManager->getVideoDriver()->getGPUProgrammingServices();
LavaShaderCallBack* infs = new LavaShaderCallBack();

s32 shader = 0;
shader = gpu->addHighLevelShaderMaterialFromFiles
(
vert, "main", EVST_VS_2_0,
frag, "main", EPST_PS_2_0,infs
);

_meshSceneNode->setMaterialType((E_MATERIAL_TYPE)shader);
//_______________________________________________________________________
I guess I need to manage that pointer differently.

While these shaders do the same, i couldn't connect the dots in how it worked. But I got it now =)
Thanks for your reply.

Re: TGMs Shader Package[C++/GLSL]

Posted: Sun May 27, 2012 9:03 am
by robmar
Nice work! I have a glass shader which also allows the glass to be textured if anyone is interested. Also converting GLSL to HLSL.

Re: TGMs Shader Package[C++/GLSL]

Posted: Sun May 27, 2012 6:44 pm
by REDDemon
yes I'm really interested in a glass shader O_O