[shaders]Bloom + Better Light
- azekill_DIABLO
- Member
- Posts: 7507
- Joined: Wed Oct 29, 2014 20:05
- GitHub: azekillDIABLO
- In-game: azekill_DIABLO
- Location: OMICRON
- Contact:
Re: [shaders]Bloom + Better Light
very interesting!
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!
DMs are always open if you want to get in touch!
Re: [shaders]Bloom + Better Light
I'm currently working on a texture pack that includes materials and normals. The tutorials online mention a diffuse map and a reflection map as well as a normal map. From my understanding Minetest currently does do normals but I'm not sure about diffuse and probably not reflection. Materials I don't think are considered at this point but I'm adding in some defaults in anyway.
Diffuse + reflection map needed?
Source:
https://www.blenderguru.com/tutorials/b ... -texturing
Diffuse + reflection map needed?
Source:
https://www.blenderguru.com/tutorials/b ... -texturing
Re: [shaders]Bloom + Better Light
How would this work with shadows and moving meshes? Would you do lighting on entities separately?Byakuren wrote:Color lighting is doable, but it wouldn't work quite right due to the way ambient lighting is approximated in Minetest. It might look "good enough" for inclusion, though.
See these blog posts I found for more info:
https://www.seedofandromeda.com/blogs/2 ... -game-pt-1
https://www.seedofandromeda.com/blogs/3 ... -game-pt-2
- ThomasMonroe
- Member
- Posts: 286
- Joined: Tue Apr 04, 2017 16:21
- GitHub: ThomasMonroe314
- IRC: ThomasMonroe TMcSquared
- In-game: ThomasMonroe TMcSquared
- Location: Wherever I am at
Re: [shaders]Bloom + Better Light
lol, understoodSkulls wrote:I thought if we want multi pass, enable / disable shader attributes or levels we will need a new client binary and I *think* thats what I was calling the 'shader binary': modified client binary + shaders. Or I hope thats what I was thinking.ThomasMonroe wrote: Shaders are compiled at load time, so they do not need to be in their binary format, what would need to happen is the shaders would need to be distributed like mods.
I don't make messes, I just, er...disturb the local entropy!
- LMD
- Member
- Posts: 1386
- Joined: Sat Apr 08, 2017 08:16
- GitHub: appgurueu
- IRC: appguru[eu]
- In-game: LMD
- Location: Germany
- Contact:
Re: [shaders]Bloom + Better Light
No. What reason for ? The problem with minetest is : It calculates light using an abstract light level construct. It's results can be used for in-game calculation(node light-level), but mustn't be used for rendering. We have to implementSkulls wrote:How would this work with shadows and moving meshes? Would you do lighting on entities separately?Byakuren wrote:Color lighting is doable, but it wouldn't work quite right due to the way ambient lighting is approximated in Minetest. It might look "good enough" for inclusion, though.
See these blog posts I found for more info:
https://www.seedofandromeda.com/blogs/2 ... -game-pt-1
https://www.seedofandromeda.com/blogs/3 ... -game-pt-2
lighting in the 2nd rendering pass for reasonable efficiency. The problem that I am facing right now is :
- on most graphic cards, a texture cannot exceed a size of 1024x1024, what is required for high-quality shadows.
- a cubemap contains 6 times such textures, representing the face of a cube
- GL allows at maximum 27 textures(correct me if I'm wrong)
- for non-directional light, the world has to be rendered out of all 6 cube perspectives
- and now the player places 99 torches...
- there are to many of them to calculate shadows for each one !
(also, efficiency is lost in the sea then)
- LMD
- Member
- Posts: 1386
- Joined: Sat Apr 08, 2017 08:16
- GitHub: appgurueu
- IRC: appguru[eu]
- In-game: LMD
- Location: Germany
- Contact:
Re: [shaders]Bloom + Better Light
SO:
- we can implement shadows and better lighting for at least the sun
- we can implement shadows and better lighting for at least the sun
- LMD
- Member
- Posts: 1386
- Joined: Sat Apr 08, 2017 08:16
- GitHub: appgurueu
- IRC: appguru[eu]
- In-game: LMD
- Location: Germany
- Contact:
Re: [shaders]Bloom + Better Light
1st aim :
Implementing 2nd pass shaders for lighting. They will use :
- normalmap
- rendered scene without lighting
- optional, a depthmap
Pros :
- renders fast
Cons :
- any ideas ?
Here's what I've got so far : (NO WARRANTY !, UNTESTED ! )
Vertex Shader, pass-thru :
Fragment Shader :
Implementing 2nd pass shaders for lighting. They will use :
- normalmap
- rendered scene without lighting
- optional, a depthmap
Pros :
- renders fast
Cons :
- any ideas ?
Here's what I've got so far : (NO WARRANTY !, UNTESTED ! )
Vertex Shader, pass-thru :
Code: Select all
#version 330
in vec3 attribute_Position;
in vec2 texcoords;
in vec3 normal;
in vec3 transform;
out vec2 texcoords_pass;
void main(void)
{
texcoords_pass=texcoords;
gl_Position=vec4(attribute_Position,1.0f);
}
Code: Select all
#version 330
layout(location=0) out vec4 litColor;
uniform sampler2D direction_to_light;
uniform sampler2D rendered_scene;
uniform sampler2D normalmap;
uniform sampler2D depthmap;
in vec2 texcoords_pass;
void main (void)
{
//Calculating the direction to viewer, necessary for specular lighting, depthmap used for this
float depth=1.0f-(texture(depthmap,texcoords_pass).x);
vec3 dir_to_viewer = vec3((texcoords_pass-0.5f)*depth,(texcoords_pass-0.5f)*depth,depth);
vec4 color=texture(rendered_scene, texcoords_pass);
vec3 normal=texture(normalmap, texcoords_pass);
vec3 to_light=texture(direction_to_light, texcoords_pass);
normal.x=(normal.x-0.5f)*2.0f;
normal.y=(normal.y-0.5f)*2.0f;
normal.z=(normal.z-0.5f)*2.0f;
float diffuse=dot(normal,to_light);
litColor=vec4(color.x * diffuse, color.y * diffuse, color.z * diffuse, color.w);
}
- LMD
- Member
- Posts: 1386
- Joined: Sat Apr 08, 2017 08:16
- GitHub: appgurueu
- IRC: appguru[eu]
- In-game: LMD
- Location: Germany
- Contact:
Re: [shaders]Bloom + Better Light
IM VERY PLEASED TO ANNOUNCE :
(tatatatatata *trumpets blowing*)
THE NEW GITHUB REPO !
https://github.com/appgurueu/new-shaders/upload/master
(unluckily, I've got NO clue how to embedd them in Minetest/Irrlicht)
(tatatatatata *trumpets blowing*)
THE NEW GITHUB REPO !
https://github.com/appgurueu/new-shaders/upload/master
(unluckily, I've got NO clue how to embedd them in Minetest/Irrlicht)
- azekill_DIABLO
- Member
- Posts: 7507
- Joined: Wed Oct 29, 2014 20:05
- GitHub: azekillDIABLO
- In-game: azekill_DIABLO
- Location: OMICRON
- Contact:
Re: [shaders]Bloom + Better Light
me either but it looks cool xD
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!
DMs are always open if you want to get in touch!
Re: [shaders]Bloom + Better Light
Want me to start tossing in the to-dos?
- azekill_DIABLO
- Member
- Posts: 7507
- Joined: Wed Oct 29, 2014 20:05
- GitHub: azekillDIABLO
- In-game: azekill_DIABLO
- Location: OMICRON
- Contact:
Re: [shaders]Bloom + Better Light
sure you should!
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!
DMs are always open if you want to get in touch!
Re: [shaders]Bloom + Better Light
Pull request for MIT license and CC done, mostly to test things out. I can't figure out how to request access to the repo to start tossing in the boring stuff.
- ThomasMonroe
- Member
- Posts: 286
- Joined: Tue Apr 04, 2017 16:21
- GitHub: ThomasMonroe314
- IRC: ThomasMonroe TMcSquared
- In-game: ThomasMonroe TMcSquared
- Location: Wherever I am at
Re: [shaders]Bloom + Better Light
just fork the git repo Skulls
make another branch and tinker around
make another branch and tinker around
I don't make messes, I just, er...disturb the local entropy!
Re: [shaders]Bloom + Better Light
I did that for the files and I can open up issue request but I wanted to start working on the to-dos in the "Projects" section. I can make them in my fork but then we are already getting fragmented :)ThomasMonroe wrote:just fork the git repo Skulls
make another branch and tinker around
- ThomasMonroe
- Member
- Posts: 286
- Joined: Tue Apr 04, 2017 16:21
- GitHub: ThomasMonroe314
- IRC: ThomasMonroe TMcSquared
- In-game: ThomasMonroe TMcSquared
- Location: Wherever I am at
Re: [shaders]Bloom + Better Light
then what did you mean by requesting access to the repo?
I don't make messes, I just, er...disturb the local entropy!
Re: [shaders]Bloom + Better Light
From https://github.com/appgurueu/new-shaders/projects:ThomasMonroe wrote:then what did you mean by requesting access to the repo?
That bit. Will appgurueu/new-shaders be the central focus? Is the goal to have all our code, docs, effort be pushed to that?This Repository doesn't have any projects yet
You don't have permission to create new projects in this repository
- rubenwardy
- Moderator
- Posts: 6972
- Joined: Tue Jun 12, 2012 18:11
- GitHub: rubenwardy
- IRC: rubenwardy
- In-game: rubenwardy
- Location: Bristol, United Kingdom
- Contact:
Re: [shaders]Bloom + Better Light
The difficult bit is putting this into Minetest, not writing the shaders. There are plenty of bloom and lighting implementations available online.
Also, related:
https://github.com/minetest/minetest/pull/6839
https://github.com/minetest/minetest/pull/5913
Also, related:
https://github.com/minetest/minetest/pull/6839
https://github.com/minetest/minetest/pull/5913
- ThomasMonroe
- Member
- Posts: 286
- Joined: Tue Apr 04, 2017 16:21
- GitHub: ThomasMonroe314
- IRC: ThomasMonroe TMcSquared
- In-game: ThomasMonroe TMcSquared
- Location: Wherever I am at
Re: [shaders]Bloom + Better Light
All that needs to be done now is implement a PR just for post-processing and for kilbith to figure out how to update that matrix every frame. then the fun with shaders can begin. :D
I don't make messes, I just, er...disturb the local entropy!
Re: [shaders]Bloom + Better Light
Absolutly. The shiney bits are the easy bits. I was kind of alluding to that with my long list of pain and suffering (viewtopic.php?p=305375#p305375) which is really only the start. If it is ever going to get beyond the proof of concept and "works great on my machine!" stage there is a lot of extra work that has to be done. Hence setting some goals and scope in a project.rubenwardy wrote:The difficult bit is putting this into Minetest, not writing the shaders. There are plenty of bloom and lighting implementations available online.
Also, related:
https://github.com/minetest/minetest/pull/6839
https://github.com/minetest/minetest/pull/5913
- LMD
- Member
- Posts: 1386
- Joined: Sat Apr 08, 2017 08:16
- GitHub: appgurueu
- IRC: appguru[eu]
- In-game: LMD
- Location: Germany
- Contact:
Re: [shaders]Bloom + Better Light
Sorry, but I am not very confortable with GitHub. I merged your request.Skulls wrote:From https://github.com/appgurueu/new-shaders/projects:ThomasMonroe wrote:then what did you mean by requesting access to the repo?
That bit. Will appgurueu/new-shaders be the central focus? Is the goal to have all our code, docs, effort be pushed to that?This Repository doesn't have any projects yet
You don't have permission to create new projects in this repository
Re: [shaders]Bloom + Better Light
Translation and languages, GUI changes, recovery instructions for when things go wrong...
- LMD
- Member
- Posts: 1386
- Joined: Sat Apr 08, 2017 08:16
- GitHub: appgurueu
- IRC: appguru[eu]
- In-game: LMD
- Location: Germany
- Contact:
Re: [shaders]Bloom + Better Light
Please help me. How can I allow anybody to contribute ?
Re: [shaders]Bloom + Better Light
Anybody can contribute to the files / code now. Fork and then a pull request. You act as the gatekeeper for your repo and decide what goes in and what doesn't.LMD wrote:Please help me. How can I allow anybody to contribute ?
The projects are a seperate organizational feature of GitHub, similar to the issue tracker. It is related to code but not code, pure overhead. If you wanted to add someone as a collaborator:
Repo tab: Projects
Create new project
Board name: Shaders to MT Core!
Template: Basic Kanban
Repo tab: Settings
Collaborators
add misterskullz as collaborator
Or we can do it on my git account.
Who is online
Users browsing this forum: No registered users and 7 guests