Opened 8 years ago
Last modified 8 years ago
#3781 closed enhancement
[PATCH] Improved Water Rendering — at Version 8
Reported by: | aeonios | Owned by: | |
---|---|---|---|
Priority: | Nice to Have | Milestone: | Alpha 21 |
Component: | Core engine | Keywords: | patch |
Cc: | Patch: |
Description (last modified by )
-Increases reflection and refraction texture sizes. -Changes the refraction function to be less extreme and to work better over a larger range of water depths. -Improves the reflection/fresnel function so that reflections fall off more naturally. -Reduces the intensity of sky reflections because the color is too extreme otherwise. -Reduces the distortion intensity for reflections to a more natural level.
-Cleans up the code a bit, removes old commented-out stuff and adds/improves comments in a few places.
Change History (10)
comment:1 by , 8 years ago
Keywords: | patch review added |
---|
comment:2 by , 8 years ago
comment:3 by , 8 years ago
I have tested it, but I don't see the effect of the water and the sun on your image. why?
comment:4 by , 8 years ago
When testing #3697, we also tested this patch, since it is included in attachment:trade-v2.3.patch:ticket:3697. All three of us got errors and water that was rendered completely black. It apparently has something to do with the user.cfg (likely the one of a19).
comment:5 by , 8 years ago
If you don't provide the error log then there's nothing I can do about it. :|
by , 8 years ago
Attachment: | errors.txt added |
---|
comment:6 by , 8 years ago
aeonios : you won't get the errors while replaying ? I join the errors i got in console.
comment:7 by , 8 years ago
hmm.. that looks like the patch is not being applied properly, or perhaps was not created properly. The variable it's saying was not declared definitely has a declaration and is only used within the ifdef where it was declared, so a garbled file seems most likely. I have no idea why that would happen though.
comment:8 by , 8 years ago
Description: | modified (diff) |
---|---|
Keywords: | review removed |
- With the latest patch after compiling:
ERROR: Failed to compile shader 'shaders/glsl/water_high.fs': Fragment shader failed to compile with the following errors: ERROR: 0:260: error(#143) Undeclared identifier: refColor ERROR: 0:260: error(#202) No matching overloaded function found: mix ERROR: 0:260: error(#160) Cannot convert from: "const float" to: "highp 3-component vector of vec3" ERROR: 0:331: error(#143) Undeclared identifier: alphaCoeff ERROR: error(#273) 4 compilation errors. No code generated
Options:
waterfancyeffects = "true" waternormals = "false" waterrealdepth = "false" waterreflection = "false" waterrefraction = "false" watershadows = "true" waterugly = "false"
Switching some functions (in particular water-refraction) triggers errors too.
- Why do you change things like
ReflectionTextureSize
toRefTextureSize
? (Could the error even have something to do with this?)Ref
reads less descriptive thanReflection
.
- Comments should start with capital letters
- But the effect looks impressive and it should be committed in my opinion!
Code seems OK at first glance, I'll review the changes later, but there is one thing I'd suggest you go back on: refractions can actually benefit from a downscaled texture as it applies a rudimentary "blurring" effect, which looks better.