-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Visual Effects Vol. 1 #14610
base: master
Are you sure you want to change the base?
Visual Effects Vol. 1 #14610
Conversation
Revert changes to shadow strength, this probably warrants discussion later. Also, the objects shader was missing this anyway.
Fix bad whitespaces
- "Node reflections" renamed to "node specular" - Fixed goofy artefacts for the foliage effects
Tried it, works well. I'll try to find some time in today or tomorrow evening to do a proper review. |
Sorry. Very busy work week. Haven't gotten to it, yet. |
} | ||
|
||
#if (defined(MATERIAL_WAVING_LIQUID) && defined(ENABLE_WATER_REFLECTIONS)) || defined(ENABLE_BUMPMAPS) | ||
float snoise(vec3 p) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
snoise is not used in this shader as far as I can tell... Only gnoise
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, i think the preprocessor stuff is also not in the right place…
Left two nits... Looks pretty good otherwise. |
yeah I like the reflective water too I think it looks good although you can always change it to look a bit different if you don't like it tho |
Yeah the water is a bit goofy with slopes… It looks awkward without the reflections, and smoothing the normals isn’t exactly trivial, but I‘ll look into it. |
yeah thanks also any ideas for the god rays to have a setting to control the strength of it too |
Can the water reflections be generalized to other nodes? Like having nodes specify (possibly animated) normal maps together with an option to enable it? |
probably out of scope but i like the idea. maybe also a option to specify a cube map (to reflect from) , oh and maybe costum node shaders in lua ? , yeah definitely out of scope. |
|
is there a way to fix this problem you place a full block over the water and the water glitches out with shaders on the screenshot doesn't work |
did you enable waving water by any chance , if so try disabling it (it sometimes does not render water under block correctly) |
yep I have waving shaders enabled just disabled it now it renders the water properly but I want the shaders to be on as the liquid shows as a full block and I don't like that I prefer the water to be at least a node below the full block |
make a github issue, i think the bug is in water shader as it is a bug even without using GefTau's shader (just with stock minetest) |
yeah okay |
I also think that sky reflection effect could be a little softer (maybe replace the 0.5 factor in the shader with 0.4). This is visible especially at larger viewing distances. But we can change that later if we want to. |
sorry about the duped text I had a bit of lag on my end that's why I must of clicked on it a few times for comment not knowing it would post or not |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
first look
@@ -8401,6 +8403,8 @@ child will follow movement and rotation of that bone. | |||
* `shadows` is a table that controls ambient shadows | |||
* `intensity` sets the intensity of the shadows from 0 (no shadows, default) to 1 (blackness) | |||
* This value has no effect on clients who have the "Dynamic Shadows" shader disabled. | |||
* `tint` tints the shadows with the provided color, with RGB values ranging from 0 to 1. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default?
if (translucent_foliage) { | ||
const u32 leaves_shader = m_client->getShaderSource()->getShader("nodes_shader", TILE_MATERIAL_WAVING_LEAVES, NDT_ALLFACES); | ||
leaves_material = m_client->getShaderSource()->getShaderInfo(leaves_shader).material; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have a good suggestion but this looks like totally breaking the abstraction.
Maybe it could be read from a TileLayer
of an existing leaf node (NodeDefManager
)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one I find hard to fix... This is something that isn't so much inherent to the material as it is the shader really, so breaking the abstraction is kind of an inherent thing to the problem unfortunately. I'm open to suggestions but I have no idea how to improve it tbh...
@@ -101,6 +101,11 @@ class Clouds : public scene::ISceneNode | |||
m_params.color_ambient = color_ambient; | |||
} | |||
|
|||
void setColorShadow(video::SColor color_shadow) | |||
{ | |||
m_params.color_shadow = color_shadow; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing comparison & mesh invalidation
c_side_2_f.b *= shadow.b * 0.66f + 0.33f; | ||
c_bottom_f.r *= shadow.r; | ||
c_bottom_f.g *= shadow.g; | ||
c_bottom_f.b *= shadow.b; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with the default of 204 this results in 0.92, 0.85, 0.8 (respectively)
which is different than before.
so now I have to ask: where do these magic numbers come from? what is the effect of the change?
Co-authored-by: sfan5 <[email protected]>
Also minor changes to fresnel factor
Sky reflection looks nicer now. All my nits are resolved. |
Oops i think the |
I compiled this to test it, and wow. This is incredible. Great job |
could you please update this branch/PR to latest master? b7e886a fixes building with LTO (at least for me) and that's a major performance boost (at least for me) |
Slightly amplify liquid sun reflections
clearly an amazing addition, like if it was minetest 2.0 revival, sorry i'll try to review the C++ part, i'm not very nice on shaders. |
I know what else would be awesome to see is that entities like players etc and blocks could also reflect off the water too |
There is actually a branch by @GreenXenith that adds screenspace reflections that he is planning to add at some point. It could replace these water reflections. |
@grorp 's comments were addressed. |
This comment was marked as off-topic.
This comment was marked as off-topic.
Do we need to wait for 5.10.0 for this? I'm afraid we'll let another good contribution bit-rot. |
Inlined setShadowTint function, fixed issue where third person view or getting close to nodes causes weird artefacts with their specular reflections
Yes, feature freeze applies to everyone |
Fix specular intensity not applying
i'd say, release, and merge just after, let people feedback us on 5.11-dev cycle and go ahead :) |
I see @lhofhansl removed "Action/change needed", yet #14610 (review) by @sfan5 still has unresolved comments. What happened there? |
They should all be adressed (except one that I don't know how to improve) they just aren't marked as resolved. |
This PR is based on #14508 and adds a variety of effects to enhance the visual experience. To this end, it makes changes to shader code, as well as the engine source code, the Lua API and settings.
List of Features and Changes
Lua API additions
shadow
field controls the color of the cloud's basetint
controls shadow color{ r = 0, g = 0, b = 0}
{ r = 0, g = 50, b = 180 }
Settings
Screenshots
To do
This PR is Ready for Review.
How to test
For most features, simply change the game settings. Of course, the game you use should support dynamic shadows and volumetrics.
The added Lua properties can be used like so: