GLSL Shaders

User avatar
MineYoshi
Member
Posts: 5373
Joined: Wed Jul 08, 2015 13:20
Contact:

Re: GLSL Shaders

by MineYoshi » Post

thegreatone wrote:There is a package I found titled LuaGL https://github.com/FelipeFS/luagl which seems to supply pre-written scripts for enabling user config for openGL which I am going to try to play around with but, I think it also requires some CC++ work to link LuaGL and openGL features (which scares me :D)
So not to sure how far I could get with it, as I am just learning Lua as it is. Not sure if there is anyone else interested in trying it out? But I am just adding some links just in case.
http://luagl.wikidot.com/howto
Mind you, this is completely bypassing any and all shading via irrlicht <(which is actually the way it should be done, meaning using shading features of irrlicht) by using openGL features which most definitely will not work for everyone and I am unsure which rout of implementing shaders is more likely to create some significant lag?
Well, i dunno i am learning C++ but by now i am starting with very basic stuff!

i like the idea of link LuaGL, if Minetest will have "GLSL Shaders" i think is better be not so laggy as the MC ones, that make Minetest be better than Minecraft in the Graphics area!
Also, the new things that going to come to 0.4.14 going to be incredible, so i think is better see, not laggy shaders, will be a great idea!
Also i dunno, if you want start a new thread!
Have a nice day! :D

User avatar
TumeniNodes
Member
Posts: 2941
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes
Location: in the dark recesses of the mind
Contact:

Re: GLSL Shaders

by TumeniNodes » Post

I removed my comment about a new thread. I forgot this is already it's own topic thinking that it was part of another thread.
But I found this LuaGL to look quite interesting and worth checking into.
I threw a mat.phong lua together and it loads just fine as a mod now, but is useless as I have not figured out how to point it toward any openGL controllers, so it just loads and sits there..., eating cheese :P
A Wonderful World

User avatar
TumeniNodes
Member
Posts: 2941
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes
Location: in the dark recesses of the mind
Contact:

Re: GLSL Shaders

by TumeniNodes » Post

a couple more (I think helpful) links.
Just trying to put info and links together to work from, for anyone who might feel like exploring.
If it is ok, I will add any to this list below which I think are relative and offer more useful information. And just hoping I am at least on the right track
https://www.opengl.org/wiki/Shader

https://en.wikipedia.org/wiki/OpenGL_Shading_Language

https://github.com/noct/glloadgen = seems very useful. So basically, just create a mod folder, with a
LoadGen.lua, a init.lua with dofile pointing to LoadGen.lua, and possibly
the required c+ shader files? i:e vertex, etc? I'm gonna break something
I can just sense it :D

https://bitbucket.org/alfonse/ someone who knows their stuff! Gonna have to stalk em' :D He has even
written a book which should be very interesting to anyone interested in this
endeavor.
http://alfonse.bitbucket.org/oldtut/

https://www.opengl.org/registry/

http://www.khronos.org/files/opengl44-q ... e-card.pdf

http://irrlicht.sourceforge.net/docu/cl ... uffer.html a page where some useful
info may be found.

http://www.geeks3d.com/geexlab/
Last edited by TumeniNodes on Wed Apr 27, 2016 05:35, edited 6 times in total.
A Wonderful World

User avatar
MineYoshi
Member
Posts: 5373
Joined: Wed Jul 08, 2015 13:20
Contact:

Re: GLSL Shaders

by MineYoshi » Post

nice ideas, i think that only needs someone that knows about this help you!

Polish this a lot, then you have the greatest shaders ever! =D
Have a nice day! :D

User avatar
TumeniNodes
Member
Posts: 2941
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes
Location: in the dark recesses of the mind
Contact:

Re: GLSL Shaders

by TumeniNodes » Post

MineYoshi wrote:nice ideas, i think that only needs someone that knows about this help you!

Polish this a lot, then you have the greatest shaders ever! =D
I sure hope so. I think it would be a nice addition that others would enjoy a lot, as I have seen quite a few comment / post regarding the topic.
I've been fiddling around with it, as well as working on a mod I made for myself and my daughter personally which I plan on putting up by tomorrow after I go through the whole thing to make sure I am happy with it, and the texture pack I have been working on which covers all default and mods textures in x64 and x32, but now I worry how the TP will look up against any new shading features upcoming in the newest release as well as any future shaders which may come of this (if any).
Anyway, I am having fun researching this feature and fiddling with it trying to get some sort of working progress to share, and that is what it is all about ... having fun :)
A Wonderful World

User avatar
TumeniNodes
Member
Posts: 2941
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes
Location: in the dark recesses of the mind
Contact:

Re: GLSL Shaders

by TumeniNodes » Post

I am kind of hoping that someone more experienced could take a quick look at some of the research I've put up so far, and at least let me know if I am on the right track or say "You're a moron, start over" :D
I can take constructive criticism very well
A Wonderful World

User avatar
TumeniNodes
Member
Posts: 2941
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes
Location: in the dark recesses of the mind
Contact:

Re: GLSL Shaders

by TumeniNodes » Post

So, I have been reading up on supertuxkart devs work with antartica,as a means to fill some holes in how Irrlicht handles shaders
It was decided to move from irrlicht OpenGL path when it appeared that Irrlicht wasn't designed to handle a light prepass renderer at all. Actually Irrlicht is designed to be compatible with a wide range of hardware and software combination (even unaccelerated rendering) and thus does not map very well to a full shader pipeline : for instance, there is no way to use custom vertex attributes in a shader, and texture/framebuffer are limited to GL_TEXTURE_2D. It turned out to be much easier to write a new renderer from scratch instead of patching our copy of Irrlicht (massive) codebase.
I wonder if it might make sense for me to try to get in touch with them to see if working antartica into Minetest is a possibility? Does this make sense?
It would be an addition to the engine, not a replacement and seems to work out well for them? It also sems like they have a very similar setup as Minetest, so it may be a serious remedy?
A Wonderful World

User avatar
benrob0329
Member
Posts: 1341
Joined: Thu Aug 06, 2015 22:39
GitHub: Benrob0329
IRC: benrob0329
In-game: benrob03
Location: Michigan
Contact:

Re: GLSL Shaders

by benrob0329 » Post

I suggested a switch to Antarctica, it got shot down pretty fast :-/

User avatar
Calinou
Moderator
Posts: 3169
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou
Location: Troyes, France
Contact:

Re: GLSL Shaders

by Calinou » Post

benrob0329 wrote:I suggested a switch to Antarctica, it got shot down pretty fast :-/
We can do a lot with Irrlicht already, including very optimized stuff, it just needs to be done. No need for an engine switch for this (even though Irrlicht development isn't very active nowadays).

I'm pretty sure that motion blur, water reflection and refraction can be done by someone who has knowledge in GLSL. Entity shadows should be doable as well. Apparently, Irrlicht can even use OpenGL 4.x functionality.

User avatar
TumeniNodes
Member
Posts: 2941
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes
Location: in the dark recesses of the mind
Contact:

Re: GLSL Shaders

by TumeniNodes » Post

Calinou wrote:
benrob0329 wrote:I suggested a switch to Antarctica, it got shot down pretty fast :-/
We can do a lot with Irrlicht already, including very optimized stuff, it just needs to be done. No need for an engine switch for this (even though Irrlicht development isn't very active nowadays).

I'm pretty sure that motion blur, water reflection and refraction can be done by someone who has knowledge in GLSL. Entity shadows should be doable as well. Apparently, Irrlicht can even use OpenGL 4.x functionality.
Thank you. I guess then it would make more sense for me to continue researching into GLSL, and getting n touch with people who are experienced in it.
From what I see STK have actually seem to have merged antartica into Irrlicht, using it as mostly a rendering agent, with Irrlicht more as the base? Unless I am misunderstanding, that is the only reason why I was wondering if the same implementation would be useable / workable in Minetest.
But, with your thoughts, I agree is best to refocus myself and work at exploiting Irrlicht fully before even thinking of adding even more code. That definitely makes more sense.
I'll just have to nag the hell out of some people on Irrlicht forums until I can find someone who would be able to give some better in depth assistance than is available via research. It gets a bit frustrating following trails and getting excited only to come to a 404 at the end.
It really is sad to see because I do know that Irrlicht has much potential, but they advertise all these features but then not really much documentation. It does not discourage me nor cause me to not like Irrlicht, it only makes me want to try to pick away at it's layers more.
We have all seen the fact that realistic water, dynamic lighting, etc. is possible via some random quick demo vids and pics onlne form earlier days made by an Irrlicht dev, but it is just that then there is not much information on the "how". I do know one part includes using a mesh for the water scene (ok easy enough, Blender, on) but, now what? :D
Anyway, antartica idea, filed away to the back and refocus. I do get distracted very easil...... "SQUIRREL!"
A Wonderful World

User avatar
TumeniNodes
Member
Posts: 2941
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes
Location: in the dark recesses of the mind
Contact:

Re: GLSL Shaders

by TumeniNodes » Post

So here is my question (2 questions actually)
Since there are these two items, LuaGL, and LoadGen.lua . I wonder if it sounds possible, to use these Lua scripts within Minetest , rather than from the actual PC itself... to at least open the doors from Minetest into openGL features?
and then be able to start enabling features through Minetest?
Hope that is not worded in a confusing way.
I know I can utilize these scripts from within my computer itself but, I guess what I am trying to figure out before I attempt it, is if I could maybe simply create these scripts and enable them as mods? thus the features might be controlled from minetest rather than from the pc. and then start trying to figure where to point them to etc.
So if I create a mod folder and title it say "loadgen", add the init.lua, to point to LoadGen.lua, and have the LoadGen.lua in the file, will this be enough to a least get a spark? or does this sound like a pointless idea
A Wonderful World

User avatar
rubenwardy
Moderator
Posts: 6969
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

Re: GLSL Shaders

by rubenwardy » Post

Lua scripts are run on the server, not the client. You'd need to add some form of client side scripting. There is also little need to have lua on the client to just change shaders. RBA made a PR which allows mods to define shaders before he departed.
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

User avatar
TumeniNodes
Member
Posts: 2941
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes
Location: in the dark recesses of the mind
Contact:

Re: GLSL Shaders

by TumeniNodes » Post

I think this is the correct one, yes?
https://github.com/RealBadAngel/terrainTest
I should have seen this sooner, he did a lot of work toward this, so will be nice to try to continue what he already did.
A Wonderful World

User avatar
rubenwardy
Moderator
Posts: 6969
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

Re: GLSL Shaders

by rubenwardy » Post

Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

User avatar
TumeniNodes
Member
Posts: 2941
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes
Location: in the dark recesses of the mind
Contact:

Re: GLSL Shaders

by TumeniNodes » Post

got it, thank you.
I definitely have to take some time and look over all the info.
I get what you said regarding server/client sides.
I was thinking I might be able to create a mod for shaders which could be set via chat line but I realize that would not work and even if it did, would be very confusing and troublesome, and not good since it would be playing with hardware features
A Wonderful World

User avatar
TumeniNodes
Member
Posts: 2941
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes
Location: in the dark recesses of the mind
Contact:

Re: GLSL Shaders

by TumeniNodes » Post

I was reading one of the posts here in the forums and a link took me to this page, which I had not come across yet in my research, and have to say it looks as though it may have some useful info, the list on the left has sections regarding shaders, etc..., pretty much every feature available with Irrlicht.
Hopefully they all lead to existing, and better documentation.
http://irrlicht.sourceforge.net/docu/cl ... uffer.html
A Wonderful World

User avatar
TumeniNodes
Member
Posts: 2941
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes
Location: in the dark recesses of the mind
Contact:

Re: GLSL Shaders

by TumeniNodes » Post

I am currently reading this, hoping it offers some really useful info http://www.geeks3d.com/geexlab/

and this is the most recent release http://www.geeks3d.com/geexlab/downloads/
A Wonderful World

User avatar
TumeniNodes
Member
Posts: 2941
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes
Location: in the dark recesses of the mind
Contact:

Re: GLSL Shaders

by TumeniNodes » Post

So..., as far as GLSL shaders goes. I have many, many questions :P
#1: do all shader features need to be accessed , or ticked on, through the core? requiring C++ work?

#2: Real Bad Angel had the water vertex, and fragment shaders working in his build (but as far as I see his build was for Android?) which I have zero clue with aside from answering my phone :P

#3: would it make any difference adding code to the existing GLSL shader scripts already present in the .minetest/client/shaders directory? As I have noticed even if I rename them, rendering them useless..., the effect still continue to work in-game. And only if I add lines of code... is there any change (such as to turn the water red) which I realize means what I added is wrong...

RubenWardy had pointed me to the PR RBA made but I am unsure what to do with it, or if it is able to work across the board.
I do know, that the shader needs to first seach for the hardware of whichever machine it is running on, and it need the coords for the water levels, etc. and Normal maps to use.
I am just trying to figure out how I need to put this all together, and the chains it all needs to follow.
The difficult parts to all this? Everything, basically. Very limited documentation... secretive programmers who seem to get off on confusing people, and everything related to it all is simply samples which don't really give much in the way of directions.
But yet, beautiful or simply nice looking water is present in so many games..., even wicked cheapie games, and it makes no sense this is not presently available in Minetest.
In my opinion, it would be such a huge thing to have even the slightest reflection for the water, it would give so much more depth and appeal in-game.
I have also tried researching the use of mesh for water features, but I am currently speaking with an individual regarding this, but have only just begun to communicate regarding it so I have a basic idea of how it works, but not how to execute all the steps.
Anyway, I am sure I am probably annoying some with this topic, which is not my intention. I am merely trying like heck to wrap my head around the secret world of shading fx.
I am also very aware that others are extremely busy working on far more crucial matters so I am in no way looking for nor asking for them to put any more into this than to maybe give me some pointers, or even to let me know if I am way out of my league? (but in a nice way haha)
I am a fast learner in some ways, but slow in others... I have an IQ of 160 but various learning curves which have always been a huge curse for me. Simply put... Im really weird and slightly psychotic :P
But any help at all is greatly appreciated
A Wonderful World

User avatar
benrob0329
Member
Posts: 1341
Joined: Thu Aug 06, 2015 22:39
GitHub: Benrob0329
IRC: benrob0329
In-game: benrob03
Location: Michigan
Contact:

Re: GLSL Shaders

by benrob0329 » Post

you've probably already looked this up but: http://www.lighthouse3d.com/tutorials/glsl-12-tutorial/

User avatar
TumeniNodes
Member
Posts: 2941
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes
Location: in the dark recesses of the mind
Contact:

Re: GLSL Shaders

by TumeniNodes » Post

benrob0329 wrote:you've probably already looked this up but: http://www.lighthouse3d.com/tutorials/glsl-12-tutorial/
YAY... more reading.... : /
hahaha, JK.... thanks for the link. I think I may have seen this, but via another link... But checking it out anyway. Repetition is often the best learning key
A Wonderful World

User avatar
rubenwardy
Moderator
Posts: 6969
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

Re: GLSL Shaders

by rubenwardy » Post

http://open.gl is also very good, I've heard
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

User avatar
TumeniNodes
Member
Posts: 2941
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes
Location: in the dark recesses of the mind
Contact:

Re: GLSL Shaders

by TumeniNodes » Post

rubenwardy wrote:http://open.gl is also very good, I've heard
yep, I have been looking through that site.
The difficult part though, is finding people who are interested in, or have the time to get into any real in-depth Q&As. And often those who do, do not seem to be very able to explain things in layman's terms. Meant as an observation, not an insult to any of them. The blame is on my end, as I get easily lost in written instructions / explanations. I am a hands on type of learner, so reading long instructions, no matter how clear to many, cause me to continuously go back and forth reading the same lines, without truly understanding.
So, I also search for video tutorials and do my best to work at learning step by step.
But then, another learning curve for me, once I get the basics, I get lost trying to apply the steps with the information I need to enter for my needs, when they differ from what was shown in the tutorial, such as the variables.
For now, I made normal maps for the animated water png's in my own texture pack and it gives a somewhat decent look to the water... but I'm greedy and want more haha

I downloaded GLew and LuaGL a while back but have yet to even unzip them and look at them.
A Wonderful World

User avatar
burli
Member
Posts: 1643
Joined: Fri Apr 10, 2015 13:18

Re: GLSL Shaders

by burli » Post


User avatar
Calinou
Moderator
Posts: 3169
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou
Location: Troyes, France
Contact:

Re: GLSL Shaders

by Calinou » Post

There's http://learnopengl.com/ and http://www.opengl-tutorial.org/ for learning OpenGL (in addition to rubenwardy's link). Also, look at http://docs.gl/ for a one-stop place to go for documentation.

User avatar
TumeniNodes
Member
Posts: 2941
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes
Location: in the dark recesses of the mind
Contact:

Re: GLSL Shaders

by TumeniNodes » Post

Calinou wrote:There's http://learnopengl.com/ and http://www.opengl-tutorial.org/ for learning OpenGL (in addition to rubenwardy's link). Also, look at http://docs.gl/ for a one-stop place to go for documentation.
I'll be sure to check these out, thanks.
Yeh, kinda have this on the back-burner, just for now. I actually have a friend who "may" be able/willing to do some work with this as soon as he has some free time from his RLJob.
A Wonderful World

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests