GLSL - Functions and versions

Post your questions, suggestions and experiences regarding to Image manipulation, 3d modeling and level editing for the Irrlicht engine here.
Post Reply
stefany
Posts: 58
Joined: Wed Dec 07, 2011 10:50 am

GLSL - Functions and versions

Post by stefany »

Hi, first of all i'm very noob in the wolrd of shaders... but anyway...

I'm using the smoothstep function that is available for glsl 1.3 and above. But in my ultra new nootebook i only have support for glsl 1.2. That means that i shouldn't be capable of using that function... but... it works.

My question is, why? Why can i use a function that works for a higher version in an older one?

pd. irrlicht print this:

Code: Select all

Irrlicht Engine version 1.9.0
Professional Edition  (Build 9200)
Temporary context
WGL_extensions: WGL_EXT_depth_float WGL_ARB_buffer_region WGL_ARB_extensions_string WGL_ARB_make_current_read WGL_ARB_pixel_format WGL_ARB_pbuffer WGL_EXT_extensions_string WGL_EXT_swap_control WGL_EXT_swap_control_tear WGL_ARB_pixel_format_float WGL_ARB_framebuffer_sRGB WGL_ARB_create_context WGL_EXT_pixel_format_packed_float
Pixel Format: 9
Irrlicht context
Using renderer: OpenGL 2.1.0
Intel(R) HD Graphics: Intel
OpenGL driver version is 1.2 or better.
GLSL version: 1.2
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: GLSL - Functions and versions

Post by hendu »

https://www.opengl.org/registry/doc/GLS ... .10.59.pdf

That page is wrong. smoothstep is available in all GLSL versions.
stefany
Posts: 58
Joined: Wed Dec 07, 2011 10:50 am

Re: GLSL - Functions and versions

Post by stefany »

Thanks, you are right! I will start using the pdf with the specifications.

The problem with smoothstep was that also my text editor says that is only available from 1.3... (:

Problem solved!
Post Reply