Quake III BSP Patch / Curves + GLSL Shader

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
poljak
Posts: 9
Joined: Mon Jul 09, 2018 5:20 pm

Quake III BSP Patch / Curves + GLSL Shader

Post by poljak »

Hello everyone, I am using BSP Maps as my levels but I am stumbling across a problem.

I created Patches (AKA curved surfaces) but I don't know how to apply a GLSL shader on it
I converted my patch to a brush entity (lets say f_wall) the entity is shown but it seem that I cannot aaply GLSL shader on it, it still uses the default Irrlicht material render regardless of the shader
(I absolutely need to use GLSL shaders, I don't want to use Q3 shaders)

The same code works on classic brush entities, but it seem that I need to do something to make it work with the patches...

I'm using Irrlicht v1.9

Have you any ideas?

If that not possible, is there a way to smooth brush normals?
What I want to do is to have a seamless curved glass

Here is how I am trying to apply the shader:

Code: Select all

MyGame::entities::WallEntity* wallE = ...;
irr::scene::IMeshSceneNode* node = wallE->getNode();
 
// This one not work (the node still use default Irrlicht material renderer) :(
node->setMaterialType(
    gpu->addHighLevelShaderMaterialFromFiles(...)
);
 
// But those one are working (probably because it still uses the default renderer)
if (wallE->isDoubleSided())
    node->getMaterial(i).BackfaceCulling = false;
 
if (wallE->isShiny())
    node->getMaterial(i).Shininess = 32.0;
poljak
Posts: 9
Joined: Mon Jul 09, 2018 5:20 pm

Re: Quake III BSP Patch / Curves + GLSL Shader

Post by poljak »

Finally found, it was a problem on my side and completely unrelated to irrlicht
Post Reply