blitzmax and wrapper irrliht - Shaders - Help plees

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
le2015
Posts: 6
Joined: Fri Jan 24, 2025 4:55 am

blitzmax and wrapper irrliht - Shaders - Help plees

Post by le2015 »

blitzmax and wrapper irrliht. Please help me understand, or past a example code for 2 type shades realization, how to make Pixel shaders and Vector shaders using the irrliht wrapper. There is information on C++, but I can’t find it on Blitzmax. Thank you!
CuteAlien
Admin
Posts: 9926
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: blitzmax and wrapper irrliht - Shaders - Help plees

Post by CuteAlien »

I can really only tell you about how to do that in Irrlicht. If you check Irrlicht examples it's example 10.Shaders. Maybe it's similar in Blitzmax, hard to tell for me.

In short: Whenever you draw stuff on GPU with a shader you can access anything that's inside S3DVertex in the shader. There's also ways to access textures in pixel shaders by default.
For most additional information you need some way to have a callback which sends variables from the CPU to the GPU (those variables are often called uniforms). So those callbacks have to be registered somehow - in Irrlicht the driver class has a getGPUProgrammingServices function. And that has functions like addHighLevelShaderMaterial where you registers those callbacks and create materials. You have to write those callbacks yourself. And the created material has to be set in the Irrlicht materials (SMaterial::setMaterialType in Irrlicht).

The shaders themselves are then written in glsl or hlsl which is kinda lika simplified c with a few more types (for vectors) and some nice utility functions.
So they should look the same (or very similar in) Blitzmax and Irrlicht. You find some examples in the Irrlicht media folder (d3d9.hlsl for Direct3d9 and opengl.vert/opengl.frag for OpenGL).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
le2015
Posts: 6
Joined: Fri Jan 24, 2025 4:55 am

Re: blitzmax and wrapper irrliht - Shaders - Help plees

Post by le2015 »

Oh, I know how to work with shaders) I don’t understand how to do this in BlitzMax for which there is a wrapper Irrliht - in the examples there are only XFX post-processing of the screen using shaders, but I don’t see anywhere how to make vertex and pixel ones for a 3D model
Noiecity
Posts: 314
Joined: Wed Aug 23, 2023 7:22 pm
Contact:

Re: blitzmax and wrapper irrliht - Shaders - Help plees

Post by Noiecity »

le2015 wrote: Fri Jan 24, 2025 11:48 am Oh, I know how to work with shaders) I don’t understand how to do this in BlitzMax for which there is a wrapper Irrliht - in the examples there are only XFX post-processing of the screen using shaders, but I don’t see anywhere how to make vertex and pixel ones for a 3D model
https://github.com/mzeilfelder/xeffects
**
If you are looking for people with whom to develop your game, even to try functionalities, I can help you, free. CC0 man.

Image
**
CuteAlien
Admin
Posts: 9926
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: blitzmax and wrapper irrliht - Shaders - Help plees

Post by CuteAlien »

Ah, sorry, can't help there with BlitzMax.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply