Anim8or Community

General Category => Ongoing Anim8or Development => Topic started by: Steve on August 27, 2014, 02:11:31 pm

Title: GLSL Shaders
Post by: Steve on August 27, 2014, 02:11:31 pm
Build 1097 adds support for OpenGL GLSL shaders.

Originally Anim8or used ARB fragment program assembly language shaders because many Anim8or users' graphics didn't support GLSL. Currently there shouldn't be any visible differences between the two shaders. GLSL is easier to write than assembly language and I will be improving the graphics. I'm toying with the idea of user written shaders of some form, either in ASL or graphically, but this is still a bit in the future.

Please let me know if you find any differences between GLSL and the ARB shaders (and of course any bugs that you find). You can toggle through shader types with the <Ctrl-B> key: GLSL -> ARB -> OpenGL Materials.

Note: there are slight differences in the shading between OpenGL Materials and the shader language because:
1) OpenGL Materials use vertex lighting and shaders use per-pixel lighting, and
2) Shaders use true Phong shading while OpenGL Materials use a half-angle reflection for specular hilights.
Title: Re: GLSL Shaders
Post by: Claude on August 28, 2014, 11:32:54 am
Hi Steve.
I had a quick  look at the new GLSL shaders.I had seen before on the run
shader editing, but never  per material. Surely save a lot of uniforms.
I noticed that if you modify a material a new shader program is created,
but the old one is not deleted.At first, I thought you kept it for the undo
function,but it's not the case since  undo creates a new one.
Thought I'd let you know.
Hope it helps.
Claude
Title: Re: GLSL Shaders
Post by: Steve on August 28, 2014, 11:53:44 am
Thanks, Claude, I'll fix it. I don't want to go about leaking resources everywhere!

What software are you using to see that? Do you have a good OpenGL tracer/debugger?
Title: Re: GLSL Shaders
Post by: Claude on August 28, 2014, 03:13:13 pm
You're welcome.
Since I have a Nvidia card, i would like to use Nsight for Visual Studio ,but I
have the VS Express Edition that doesn't support plugin.
Instead,I use AMD CodeXL.It's a free standing app.Very useful.Not perfect,
but a lot better than total darkness.

Claude

Modification:
Additional comment in Reply #24
Title: Re: GLSL Shaders
Post by: cooldude234 on August 28, 2014, 04:30:18 pm
What software are you using to see that? Do you have a good OpenGL tracer/debugger?
Steve I recommend gDEBugger as a good opengl specific debugger! It's saved my butt a few times already.
Title: Re: GLSL Shaders
Post by: captaindrewi on August 28, 2014, 08:53:40 pm
Build 1097 adds support for OpenGL GLSL shaders.
Hi Steve
Forgive my dullness but...
What will be the benefit of these glsl shaders?


Title: Re: GLSL Shaders
Post by: Steve on August 29, 2014, 09:33:12 am
cooldude234: Thanks. I'll give it a try.

captaindrewi: GLSL is much easier to write and debug and supports all the newest OpenGL capabilities. I'll be able to improve the images, add new functionality, etc. The current code is supposed to match the ARB images exactly to make it easier to find problems, but if it all goes well (i.e. nobody has problems with their graphics chip/driver) there will be some cool now things soon.
Title: Re: GLSL Shaders
Post by: Raxx on August 29, 2014, 03:38:12 pm
Would user-made shaders via ASL be incorporated into the ART and Scanline renderers? The OpenGL renderer isn't very useful in its current state, and I'd rather see other features implemented/improved first in terms of priority.
Title: Re: GLSL Shaders
Post by: Steve on August 29, 2014, 05:53:05 pm
Yes, user shaders would be supported by ASL as well. That adds a bit more work but it doesn't make sense to add them without ASL supporting.
Title: Re: GLSL Shaders
Post by: Smirkyguy on November 25, 2014, 07:14:31 pm
I don't know if any progress is being made, but there are still MASSIVE issues with GLSL shaders and Intel Graphics.
(http://i.imgur.com/FqeTwiF.png)
Dell Inspiron N5110, Windows 7 SP1, 64 bit, Intel HD Graphics 3000, Compatability mode set to Windows XP SP3, Latest drivers, Anim8or version 1124

I tested it with compatability mode turned off, did not fix the issue
Title: Re: GLSL Shaders
Post by: Steve on November 25, 2014, 08:59:32 pm
Unfortunately there's not much I can do about this. You can try using the other methods, ARB fragment programs and standard OpenGL materials. Intel's poor history of OpenGL driver support is a big reason that I continue to support these alternate real-time methods.

It's sad to think that Intel, the largest semiconductor manufacturer in the world (https://en.wikipedia.org/wiki/Semiconductor_sales_leaders_by_year#Ranking_for_year_2013), doesn't care enough to write decent drivers.
Title: Re: GLSL Shaders
Post by: Smirkyguy on November 26, 2014, 09:32:31 am
Well, that's what I was afraid you would say... any chance you can make it so that we can set the default workspace renderer? having to change it to ARB fragment every time I open it can be a little annoying.
Title: Re: GLSL Shaders
Post by: Steve on November 26, 2014, 11:23:12 am
Doh! Of course. I should have thought of that! I'll add it to the next build.
Title: Re: GLSL Shaders
Post by: Smirkyguy on November 27, 2014, 11:41:14 am
Doh! Of course. I should have thought of that! I'll add it to the next build.
Thank you!!! :D :D :D :D :D
Title: Re: GLSL Shaders
Post by: Steve on November 27, 2014, 01:31:20 pm
Smirkyguy check out build 1137 :)
Title: Re: GLSL Shaders
Post by: cooldude234 on November 28, 2014, 10:58:25 pm
Doh! Of course. I should have thought of that! I'll add it to the next build.
Lol, it's always the simplest things that go over our little programing heads, isn't it?
Title: Re: GLSL Shaders
Post by: Deepthought on December 31, 2014, 01:36:55 pm
Doh! Of course. I should have thought of that! I'll add it to the next build.
Lol, it's always the simplest things that go over our little programing heads, isn't it?
yes. I just love it how a period instead of a comma or using >> instead of << causes a big explosion of errors that takes an hour to find.
Title: Re: GLSL Shaders
Post by: thecolclough on January 01, 2015, 09:44:24 am
Doh! Of course. I should have thought of that! I'll add it to the next build.
Lol, it's always the simplest things that go over our little programing heads, isn't it?
yes. I just love it how a period instead of a comma or using >> instead of << causes a big explosion of errors that takes an hour to find.
and let's not forget the old Missing Semicolon errors!  those were always my favourite :P
Title: Re: GLSL Shaders
Post by: Steve on January 02, 2015, 01:21:31 pm
Doh! Of course. I should have thought of that! I'll add it to the next build.
Lol, it's always the simplest things that go over our little programing heads, isn't it?
yes. I just love it how a period instead of a comma or using >> instead of << causes a big explosion of errors that takes an hour to find.
and let's not forget the old Missing Semicolon errors!  those were always my favourite :P
I didn't know you could nest quotes this deep!
Title: Re: GLSL Shaders
Post by: Deepthought on January 02, 2015, 02:42:49 pm
Doh! Of course. I should have thought of that! I'll add it to the next build.
Lol, it's always the simplest things that go over our little programing heads, isn't it?
yes. I just love it how a period instead of a comma or using >> instead of << causes a big explosion of errors that takes an hour to find.
and let's not forget the old Missing Semicolon errors!  those were always my favourite :P
I didn't know you could nest quotes this deep!
let's see how far it can go
Title: Re: GLSL Shaders
Post by: thecolclough on January 03, 2015, 08:48:30 am
Doh! Of course. I should have thought of that! I'll add it to the next build.
Lol, it's always the simplest things that go over our little programing heads, isn't it?
yes. I just love it how a period instead of a comma or using >> instead of << causes a big explosion of errors that takes an hour to find.
and let's not forget the old Missing Semicolon errors!  those were always my favourite :P
I didn't know you could nest quotes this deep!
let's see how far it can go
...it goes deeper... which i think means it's johnar's turn to do the next one...
sorry, there was a topical pun going and i couldn't resist :D
Title: Re: GLSL Shaders
Post by: cooldude234 on January 11, 2015, 04:36:16 am
Doh! Of course. I should have thought of that! I'll add it to the next build.
Lol, it's always the simplest things that go over our little programing heads, isn't it?
yes. I just love it how a period instead of a comma or using >> instead of << causes a big explosion of errors that takes an hour to find.
and let's not forget the old Missing Semicolon errors!  those were always my favourite :P
I didn't know you could nest quotes this deep!
let's see how far it can go
...it goes deeper... which i think means it's johnar's turn to do the next one...
sorry, there was a topical pun going and i couldn't resist :D
I just LOL'd to this whole thing ;P
Title: Re: GLSL Shaders
Post by: Deepthought on January 11, 2015, 11:17:48 am
it's like when you point a camera at the tv it's connected to
Title: Re: GLSL Shaders
Post by: cooldude234 on January 13, 2015, 04:31:25 pm
it's like when you point a camera at the tv it's connected to
I was thinking it looked like we were building a pyramid. We're kinda like the Egyptians :P
Title: Re: GLSL Shaders
Post by: Claude on February 23, 2015, 02:58:06 pm
Reference: Reply #3 on August 28, 2014, 07:13:13 pm

In november 2014,Microsoft released Visual Studio Community 2013.
They say it  supports all the  functionality of Visual Studio Professional 2013
including plugin.Seems to be free like Express edition.
http://www.visualstudio.com/en-us/products/visual-studio-community-vs

Nvidia confirmed compatibility with Nsight.
https://devtalk.nvidia.com/default/topic/795591/nsight-visual-studio-edition/visual-studio-community-2013-is-supported-by-nsight/

Haven't tried it yet.Don't know when I will, but thought I should add this comment to  the original post.

Claude