Omicron - prerelease 0.7 "Tweaky Update"
- LMD
- Member
- Posts: 1386
- Joined: Sat Apr 08, 2017 08:16
- GitHub: appgurueu
- IRC: appguru[eu]
- In-game: LMD
- Location: Germany
- Contact:
Re: Omicron - prerelease 0.3 "A little wet"
"Are there tools/crafting/inventory in Craft NG/Omicron ?"
I didn't think this is Craft NG, no need for an airstrike ! But I thought "probably you added that" or "is that already in Craft NG"
I didn't think this is Craft NG, no need for an airstrike ! But I thought "probably you added that" or "is that already in Craft NG"
- azekill_DIABLO
- Member
- Posts: 7507
- Joined: Wed Oct 29, 2014 20:05
- GitHub: azekillDIABLO
- In-game: azekill_DIABLO
- Location: OMICRON
- Contact:
Re: Omicron - prerelease 0.3 "A little wet"
*Charlie Tango come back to base! Abort Mission!*
okay I was just a bit TRIGGERED. And bout the upcoming changes, got ideas? :D
okay I was just a bit TRIGGERED. And bout the upcoming changes, got ideas? :D
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!
- LMD
- Member
- Posts: 1386
- Joined: Sat Apr 08, 2017 08:16
- GitHub: appgurueu
- IRC: appguru[eu]
- In-game: LMD
- Location: Germany
- Contact:
Re: Omicron - prerelease 0.3 "A little wet"
Only one :
- That shaders gotta be AWESOME
- That shaders gotta be AWESOME
- azekill_DIABLO
- Member
- Posts: 7507
- Joined: Wed Oct 29, 2014 20:05
- GitHub: azekillDIABLO
- In-game: azekill_DIABLO
- Location: OMICRON
- Contact:
Re: Omicron - prerelease 0.3 "A little wet"
*dies*
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!
- LMD
- Member
- Posts: 1386
- Joined: Sat Apr 08, 2017 08:16
- GitHub: appgurueu
- IRC: appguru[eu]
- In-game: LMD
- Location: Germany
- Contact:
Re: Omicron - prerelease 0.3 "A little wet"
1st goal would be implementing a 2nd rendering stage, I'd say.
- azekill_DIABLO
- Member
- Posts: 7507
- Joined: Wed Oct 29, 2014 20:05
- GitHub: azekillDIABLO
- In-game: azekill_DIABLO
- Location: OMICRON
- Contact:
Re: Omicron - prerelease 0.3 "A little wet"
Well. It is inclued in transparent blocks; but it seems hard to do.
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!
- LMD
- Member
- Posts: 1386
- Joined: Sat Apr 08, 2017 08:16
- GitHub: appgurueu
- IRC: appguru[eu]
- In-game: LMD
- Location: Germany
- Contact:
Re: Omicron - prerelease 0.3 "A little wet"
No, you don't necessarily need 2nd stage for transparent blocks(Geometry Shader doesnt count as rendering stage as its between fragment and vertex shader), but for some effects such as high contrast, or edge finder, or focus blur, or even rendered shadows. I once made a shader collection...
https://github.com/appgurueu/new-shaders
https://github.com/appgurueu/new-shaders
- azekill_DIABLO
- Member
- Posts: 7507
- Joined: Wed Oct 29, 2014 20:05
- GitHub: azekillDIABLO
- In-game: azekill_DIABLO
- Location: OMICRON
- Contact:
Re: Omicron - prerelease 0.3 "A little wet"
Oh you mean adding a way to post process? I won't consider it really important for now, sorry. transparency MUST be achieved.
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!
- azekill_DIABLO
- Member
- Posts: 7507
- Joined: Wed Oct 29, 2014 20:05
- GitHub: azekillDIABLO
- In-game: azekill_DIABLO
- Location: OMICRON
- Contact:
Re: Omicron - prerelease 0.3 "A little wet"
Thanks! I'm still struggling to understand something but ... It'll do. One day.
As you seem to have a bit of experience with OPGL, have you got an idea of how this stupid code does know what is a cloud:
It isn't referred to anywhere else as cloud, but Item_CLOUD. It bothers me. EDIT: THe db only gives Ids (logical). Will try to see who helps this little shader!
EDIT2: Seems like nothing related to clouds themselves I can even erase a part of it nothing chnages.
As you seem to have a bit of experience with OPGL, have you got an idea of how this stupid code does know what is a cloud:
Code: Select all
bool cloud = color == vec3(1.0, 1.0, 1.0);
if (cloud && bool(ortho)) {
discard;
}
EDIT2: Seems like nothing related to clouds themselves I can even erase a part of it nothing chnages.
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!
- LMD
- Member
- Posts: 1386
- Joined: Sat Apr 08, 2017 08:16
- GitHub: appgurueu
- IRC: appguru[eu]
- In-game: LMD
- Location: Germany
- Contact:
Re: Omicron - prerelease 0.3 "A little wet"
Dunno what the bool ortho is, but it just checks whether the color is 100 % white, and if so, discards rendering the fragment.
Apparently ortho is uniform bool.
Apparently ortho is uniform bool.
- azekill_DIABLO
- Member
- Posts: 7507
- Joined: Wed Oct 29, 2014 20:05
- GitHub: azekillDIABLO
- In-game: azekill_DIABLO
- Location: OMICRON
- Contact:
Re: Omicron - prerelease 0.3 "A little wet"
okay, It might work if I do same for water and then change alpha to something like... 0.5? I might need to active Blending, however this seems not to hard. (I say that in five minutes I'll be crying like "why am I such a noob")
EDIT: that means water will have a plain color for now. It doesn't disturb me.
EDIT2: nothing works as intended, I think my OpenGL is a bit outdated (and I didn't manage to update it, my OS fault)
EDIT: that means water will have a plain color for now. It doesn't disturb me.
EDIT2: nothing works as intended, I think my OpenGL is a bit outdated (and I didn't manage to update it, my OS fault)
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!
- azekill_DIABLO
- Member
- Posts: 7507
- Joined: Wed Oct 29, 2014 20:05
- GitHub: azekillDIABLO
- In-game: azekill_DIABLO
- Location: OMICRON
- Contact:
Re: Omicron - prerelease 0.3 "A little wet"
It was in front of me during all this time:
I think the `1.0` corresponds to alpha.
EDIT: modifying it does nothing :( What's the point of doing a library if nothing is explained properly.
EDIT2: There's no way to make the game render transparency... I don't understand at all.
Code: Select all
gl_FragColor = vec4(color, 1.0);
EDIT: modifying it does nothing :( What's the point of doing a library if nothing is explained properly.
EDIT2: There's no way to make the game render transparency... I don't understand at all.
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!
- azekill_DIABLO
- Member
- Posts: 7507
- Joined: Wed Oct 29, 2014 20:05
- GitHub: azekillDIABLO
- In-game: azekill_DIABLO
- Location: OMICRON
- Contact:
Re: Omicron - prerelease 0.3 "A little wet"
Well I done something simple:
IT should show transparency no LMD? It doesn't.
Note: I added this code at line 2727
Can you pliz try for me?
Code: Select all
#version 120
<boring stuff, the problem isn't here>
const float pi = 3.14159265;
void main() {
vec4 color = texture2D(sampler, fragment_uv);
//color.a = 1.0;
if (color == vec4(1.0, 0.0, 1.0, 1.0)) {
discard;
//color.a = 0.4;
}
if (color == vec4(0.2, 0.2, 1.0, 0.4)) {
//discard;
color.a = 0.4;
}
gl_FragColor = color;
}
Note: I added this code at line 2727
Code: Select all
glEnable(GL_BLEND);
glBlendEquation(GL_FUNC_ADD);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
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!
- LMD
- Member
- Posts: 1386
- Joined: Sat Apr 08, 2017 08:16
- GitHub: appgurueu
- IRC: appguru[eu]
- In-game: LMD
- Location: Germany
- Contact:
Re: Omicron - prerelease 0.3 "A little wet"
Adding alpha rendering in a renderer I don't know could be hard, there are many params you have to have.
Did you make sure the TEXTURES have alpha ?
Else, that one "vec4 color = texture2D(sampler, fragment_uv);" won't have alpha channel, or alpha is constant 1...
Did you make sure the TEXTURES have alpha ?
Else, that one "vec4 color = texture2D(sampler, fragment_uv);" won't have alpha channel, or alpha is constant 1...
- azekill_DIABLO
- Member
- Posts: 7507
- Joined: Wed Oct 29, 2014 20:05
- GitHub: azekillDIABLO
- In-game: azekill_DIABLO
- Location: OMICRON
- Contact:
Re: Omicron - prerelease 0.3 "A little wet"
I was told LodePNG uses alpha. And the png in itself has alpha. DO you think a better precision is needed to define the vector4? even by putting color.a = 0.5 it doesn't change. :CLMD wrote:Adding alpha rendering in a renderer I don't know could be hard, there are many params you have to have.
Did you make sure the TEXTURES have alpha ?
Else, that one "vec4 color = texture2D(sampler, fragment_uv);" won't have alpha channel, or alpha is constant 1...
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!
- LMD
- Member
- Posts: 1386
- Joined: Sat Apr 08, 2017 08:16
- GitHub: appgurueu
- IRC: appguru[eu]
- In-game: LMD
- Location: Germany
- Contact:
Re: Omicron - prerelease 0.3 "A little wet"
I would have to get used to that complex renderer of Omicron '_'
- azekill_DIABLO
- Member
- Posts: 7507
- Joined: Wed Oct 29, 2014 20:05
- GitHub: azekillDIABLO
- In-game: azekill_DIABLO
- Location: OMICRON
- Contact:
Re: Omicron - prerelease 0.3 "A little wet"
.-. Sadly
EDIT: I'm still working on it! got some stupid results:
The point is that hardcoding alpha doesn't even work. OpenGL doesn't want to render something transparent.
EDIT2: It's unexact, it renders perfectly 2D transparence (I made font texture half - transparent and red, it showed it game just fine.) So there are two options: the code specifies something special for the font, or lodePNG f***ed up. Which I don't want, cause it's gonna be a pain implementing a new system like libPNG. *cries*
EDIT3: LodePNG works, something actually disable alpha, outside of the GLSL code.
EDIT4: Found the solution. OMG. This was hard.
EDIT5: It works. OMG It works!
EDIT: I'm still working on it! got some stupid results:
The point is that hardcoding alpha doesn't even work. OpenGL doesn't want to render something transparent.
EDIT2: It's unexact, it renders perfectly 2D transparence (I made font texture half - transparent and red, it showed it game just fine.) So there are two options: the code specifies something special for the font, or lodePNG f***ed up. Which I don't want, cause it's gonna be a pain implementing a new system like libPNG. *cries*
EDIT3: LodePNG works, something actually disable alpha, outside of the GLSL code.
EDIT4: Found the solution. OMG. This was hard.
EDIT5: It works. OMG It works!
- Attachments
-
- well.
- screenshot-shaderdev.jpg (39.62 KiB) Viewed 1215 times
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!
- azekill_DIABLO
- Member
- Posts: 7507
- Joined: Wed Oct 29, 2014 20:05
- GitHub: azekillDIABLO
- In-game: azekill_DIABLO
- Location: OMICRON
- Contact:
Re: Omicron - prerelease 0.3 "A little wet"
I have bugs with the new transparency. I'm reimplementing the ancient shaders, we may temporarily loose graphical quality. I promise I'll try to fix for next pre-release. However the hardest to reimplement will be the ambient occlusion (but it can be a good occasion to implement a real lightning system). BTW, the bugs of chunk border have been fixed, because, LOL, everything is at max brightness.
EDIT: Ambient occlusion reimplemented, light system reimplemented. The transparent blocks are still glitched. This must be fixed in the C code by giving a special status to water like that blocks near water still render their faces. I didn't find a way to do it now.
Here's where I am in the progress. Fog still asks to be added back, should be pie now.
EDIT2: I'm happy to announce you I successfully re-implemented shaders with alpha support, in a shorter way than before. Update soon boiz!
EDIT: Ambient occlusion reimplemented, light system reimplemented. The transparent blocks are still glitched. This must be fixed in the C code by giving a special status to water like that blocks near water still render their faces. I didn't find a way to do it now.
Here's where I am in the progress. Fog still asks to be added back, should be pie now.
EDIT2: I'm happy to announce you I successfully re-implemented shaders with alpha support, in a shorter way than before. Update soon boiz!
- Attachments
-
- WIP shaders. Enjoy.
- screenshot-new-shaders.jpg (173.43 KiB) Viewed 1215 times
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!
- azekill_DIABLO
- Member
- Posts: 7507
- Joined: Wed Oct 29, 2014 20:05
- GitHub: azekillDIABLO
- In-game: azekill_DIABLO
- Location: OMICRON
- Contact:
Re: Omicron - prerelease 0.3 "A little wet"
The todo list to go release...
- Get transparent blocks ☑
- Get water working a bit
- Topic : Get a better HUD/GUI
- Getting an inventory
- Crafting system (terraria like)
- Topic : Debugging Light
- Chunck border bugs (https://github.com/azekillDIABLO/omicron/issues/3)
- Light blocks
- No more bright caves
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!
- LMD
- Member
- Posts: 1386
- Joined: Sat Apr 08, 2017 08:16
- GitHub: appgurueu
- IRC: appguru[eu]
- In-game: LMD
- Location: Germany
- Contact:
Re: Omicron - prerelease 0.3 "A little wet"
Did you really sort the faces to get transparent blocks or did it - well - just work ? 0.0 even my Java Engine has ATM no support for transparency 0.0
- azekill_DIABLO
- Member
- Posts: 7507
- Joined: Wed Oct 29, 2014 20:05
- GitHub: azekillDIABLO
- In-game: azekill_DIABLO
- Location: OMICRON
- Contact:
Re: Omicron - prerelease 0.3 "A little wet"
It just worked fine :D I still have to sort the faces though, there are some extremely noticable artifacts, but as this task in acheived in C with qsort, I'm not so afraid to work on it. But I'm pretty sure It can work without it just by making blocks near water (that are not water) render all their faces, or at least the ones near water. Like that we would have water looking like the Minecraft one.
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!
- azekill_DIABLO
- Member
- Posts: 7507
- Joined: Wed Oct 29, 2014 20:05
- GitHub: azekillDIABLO
- In-game: azekill_DIABLO
- Location: OMICRON
- Contact:
Re: Omicron - prerelease 0.3 "A little wet"
DEVLOG: Nothing really interesting here. Seems like the render system renders blocks a bit randomly. The transparency is bugged for no reason, it allows xraying? I don't know how to fix lol.
EDIT: Wow it's a real hard problem. I don't think It'll be easy. Sorry if it takes time.
EDIT: Wow it's a real hard problem. I don't think It'll be easy. Sorry if it takes time.
Last edited by azekill_DIABLO on Sat Aug 25, 2018 18:39, edited 1 time in total.
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!
- LMD
- Member
- Posts: 1386
- Joined: Sat Apr 08, 2017 08:16
- GitHub: appgurueu
- IRC: appguru[eu]
- In-game: LMD
- Location: Germany
- Contact:
Re: Omicron - prerelease 0.3 "A little wet"
I told you that you had to sort that faces. Use the Geometry Shader if you can...
(Note : this may have a NOTICEABLE impact on performance with many transparent blocks)
So, compile 2 Shader Programs :
1. Normal Block Shader
2. Transparent Block Shader (Block VS + Sorting Geometry Shader + Block FS)
Now, render all COMPLETELY intransparent blocks using shader one, and all PARTIALLY transparent ones using no2.
(Note : this may have a NOTICEABLE impact on performance with many transparent blocks)
So, compile 2 Shader Programs :
1. Normal Block Shader
2. Transparent Block Shader (Block VS + Sorting Geometry Shader + Block FS)
Now, render all COMPLETELY intransparent blocks using shader one, and all PARTIALLY transparent ones using no2.
- azekill_DIABLO
- Member
- Posts: 7507
- Joined: Wed Oct 29, 2014 20:05
- GitHub: azekillDIABLO
- In-game: azekill_DIABLO
- Location: OMICRON
- Contact:
Re: Omicron - prerelease 0.3 "A little wet"
Hey I know you said me, I wanted to see if it worked without it. And I'm not a pro I'll try to do it. The question now is, how to use different shaders for blocks. It's currently not possible I think.
btw: 100th post. I' know it's useless :D Have you got a link to an article with examples or something? I need to the syntax and everything.
EDIT2: I was thinking, why not make a first shader to render all the scene without any supposedly transparent blocks (I say 'supposedly transparent' for a good reason, you'll understand) and then over it blend the same scene with the STBs(supposedly transparent blocks). The STBs would not even be really transparent, but they would appear as if they were.
btw: 100th post. I' know it's useless :D Have you got a link to an article with examples or something? I need to the syntax and everything.
EDIT2: I was thinking, why not make a first shader to render all the scene without any supposedly transparent blocks (I say 'supposedly transparent' for a good reason, you'll understand) and then over it blend the same scene with the STBs(supposedly transparent blocks). The STBs would not even be really transparent, but they would appear as if they were.
Last edited by azekill_DIABLO on Sun Aug 26, 2018 13:32, edited 1 time in total.
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!
Who is online
Users browsing this forum: No registered users and 4 guests