TGMs Shader Package[C++/GLSL]
problem downloading
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
-
- Posts: 18
- Joined: Sat Oct 03, 2009 7:14 am
- Location: Brisbane, Australia
- Contact:
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 to and to
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;
Code: Select all
rt0 = driver->addRenderTargetTexture(core::dimension2d<u32>(sizeW,sizeH));
Material.Wireframe = false;
Material.Lighting = false;
Material.setTexture(0,rt0);
Code: Select all
createDevice(video::EDT_OPENGL, core::dimension2d<s32>(1024, 768), 16, false, false);
Code: Select all
createDevice(video::EDT_OPENGL, core::dimension2d<u32>(1024, 768),16, false, false);
My website - Miscreant Software
I'm having an issue where my game GUI is being drawn upside-down after rendering the Radial Blur.
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.
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
Thoughts/Solutions?
Thanks in advance.
EDIT: I should note that I don't want the radial blur applied to the GUI.
Use shader callback, and store blur value in it
this what I use for skydome, but it should get you going
and on runtime just change ISkyShaderConstantSetCallBack::colorMulty
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;
};
irrRenderer 1.0
Height2Normal v. 2.1 - convert height maps to normal maps
Step back! I have a void pointer, and I'm not afraid to use it!
Height2Normal v. 2.1 - convert height maps to normal maps
Step back! I have a void pointer, and I'm not afraid to use it!
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!
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!
Anyone have any ideas?Aptos wrote:I'm having an issue where my game GUI is being drawn upside-down after rendering the Radial Blur.
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.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
Thoughts/Solutions?
Thanks in advance.
EDIT: I should note that I don't want the radial blur applied to the GUI.
-
- Posts: 222
- Joined: Mon Jan 19, 2009 10:03 pm
- Location: Miami, Florida
- Contact:
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 >.<Aptos wrote:Anyone have any ideas?Aptos wrote:I'm having an issue where my game GUI is being drawn upside-down after rendering the Radial Blur.
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.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
Thoughts/Solutions?
Thanks in advance.
EDIT: I should note that I don't want the radial blur applied to the GUI.
Re: TGMs Shader Package[C++/GLSL]
Is any way how can I get blur effect with only one setRenderTarget() call?
programmer is bad designer
designer is bad programmer
designer is bad programmer
Re: TGMs Shader Package[C++/GLSL]
Radial blur is awesome thx!
Change the line 95: " avg /= 11.0;" -> " avg /= 1.0;" to get more intensity like this
Change the line 95: " avg /= 11.0;" -> " avg /= 1.0;" to get more intensity like this
Re: TGMs Shader Package[C++/GLSL]
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?
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]
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.
Nice the Lava shader, didn't noticed it before. Very good looking.
Junior Irrlicht Developer.
Real value in social networks is not about "increasing" number of followers, but about getting in touch with Amazing people.
- by Me
Real value in social networks is not about "increasing" number of followers, but about getting in touch with Amazing people.
- by Me
Re: TGMs Shader Package[C++/GLSL]
I actually took the different route and just create the callbacks seperately And load them from a file.
in my sphere object:
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.
in my sphere object:
I guess I need to manage that pointer differently.//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);
//_______________________________________________________________________
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]
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]
yes I'm really interested in a glass shader O_O
Junior Irrlicht Developer.
Real value in social networks is not about "increasing" number of followers, but about getting in touch with Amazing people.
- by Me
Real value in social networks is not about "increasing" number of followers, but about getting in touch with Amazing people.
- by Me