GLSL Shaders

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

Re: GLSL Shaders

by MineYoshi » Thu Apr 14, 2016 21:39

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!
 

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

Re: GLSL Shaders

by TumeniNodes » Thu Apr 14, 2016 22:29

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
Ich mag keine grünen Eier und Schinken, ich mag sie nicht Sam I Am
 

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

Re: GLSL Shaders

by TumeniNodes » Thu Apr 14, 2016 22:43

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-quick-reference-card.pdf

http://irrlicht.sourceforge.net/docu/classirr_1_1scene_1_1_i_vertex_buffer.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.
Ich mag keine grünen Eier und Schinken, ich mag sie nicht Sam I Am
 

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

Re: GLSL Shaders

by MineYoshi » Thu Apr 14, 2016 23:09

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
 

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

Re: GLSL Shaders

by TumeniNodes » Thu Apr 14, 2016 23:36

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 :)
Ich mag keine grünen Eier und Schinken, ich mag sie nicht Sam I Am
 

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

Re: GLSL Shaders

by TumeniNodes » Fri Apr 15, 2016 12:17

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
Ich mag keine grünen Eier und Schinken, ich mag sie nicht Sam I Am
 

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

Re: GLSL Shaders

by TumeniNodes » Fri Apr 15, 2016 12:54

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?
Ich mag keine grünen Eier und Schinken, ich mag sie nicht Sam I Am
 

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

Re: GLSL Shaders

by benrob0329 » Fri Apr 15, 2016 12:58

I suggested a switch to Antarctica, it got shot down pretty fast :-/
Social: YouTube Peertube Matrix Room: #minetest:matrix.org | Games: The Infinite IKEA
 

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

Re: GLSL Shaders

by Calinou » Fri Apr 15, 2016 13:06

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: 2827
Joined: Fri Feb 26, 2016 19:49
Location: in the dark recesses of the mind
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes

Re: GLSL Shaders

by TumeniNodes » Fri Apr 15, 2016 13:22

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!"
Ich mag keine grünen Eier und Schinken, ich mag sie nicht Sam I Am
 

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

Re: GLSL Shaders

by TumeniNodes » Fri Apr 15, 2016 14:17

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
Ich mag keine grünen Eier und Schinken, ich mag sie nicht Sam I Am
 

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

Re: GLSL Shaders

by rubenwardy » Fri Apr 15, 2016 14:57

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.
 

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

Re: GLSL Shaders

by TumeniNodes » Fri Apr 15, 2016 16:05

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.
Ich mag keine grünen Eier und Schinken, ich mag sie nicht Sam I Am
 

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

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

Re: GLSL Shaders

by TumeniNodes » Fri Apr 15, 2016 17:10

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
Ich mag keine grünen Eier und Schinken, ich mag sie nicht Sam I Am
 

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

Re: GLSL Shaders

by TumeniNodes » Sat Apr 16, 2016 01:45

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/classirr_1_1scene_1_1_i_vertex_buffer.html
Ich mag keine grünen Eier und Schinken, ich mag sie nicht Sam I Am
 

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

Re: GLSL Shaders

by TumeniNodes » Wed Apr 27, 2016 05:14

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/
Ich mag keine grünen Eier und Schinken, ich mag sie nicht Sam I Am
 

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

Re: GLSL Shaders

by TumeniNodes » Sat Apr 30, 2016 13:33

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
Ich mag keine grünen Eier und Schinken, ich mag sie nicht Sam I Am
 

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

Re: GLSL Shaders

by benrob0329 » Sat Apr 30, 2016 16:42

you've probably already looked this up but: http://www.lighthouse3d.com/tutorials/glsl-12-tutorial/
Social: YouTube Peertube Matrix Room: #minetest:matrix.org | Games: The Infinite IKEA
 

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

Re: GLSL Shaders

by TumeniNodes » Sat Apr 30, 2016 16:52

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
Ich mag keine grünen Eier und Schinken, ich mag sie nicht Sam I Am
 

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

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

Re: GLSL Shaders

by TumeniNodes » Sat Apr 30, 2016 20:51

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.
Ich mag keine grünen Eier und Schinken, ich mag sie nicht Sam I Am
 

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

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

Re: GLSL Shaders

by Calinou » Tue Jun 28, 2016 21:33

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: 2827
Joined: Fri Feb 26, 2016 19:49
Location: in the dark recesses of the mind
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes

Re: GLSL Shaders

by TumeniNodes » Tue Jun 28, 2016 21:40

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.
Ich mag keine grünen Eier und Schinken, ich mag sie nicht Sam I Am
 

PreviousNext

Return to Feature Discussion



Who is online

Users browsing this forum: No registered users and 2 guests