We should avoid to send not needed data into shaders as much as possible.
Details
enable reflection/refraction
move camera
disable them
move camera
enable them
check that effects are correctly applied
Diff Detail
- Repository
- rP 0 A.D. Public Repository
- Branch
- /ps/trunk
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 7776 Build 12660: Vulcan Build Jenkins Build 12659: arc lint + arc unit
Event Timeline
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/differential/1609/display/redirect
- Indenting the water shader is wrong (the #ifs don't necessarily correspond to real ifs)
Edit: got confused about one point.
I would leave indenting, because it is easier to read.
Used already in this file and some others: terrain_common.vs, terrain_common.fs, model_waterfall.vs, model_waterfall.fs, model_water.fs::get_shadow, model_common.*
I agree that it's harder to read the code without indents for some people. Only objection that I'm thinking about, if you remove #if with leaving the code you need to fix the indents again that also means you rewrite the blame again.
@Angen The "real" indentation of the if L315-330 conflicts with the #if indentation. That's one reason not to indent I think.
binaries/data/mods/public/shaders/glsl/water_high.fs | ||
---|---|---|
269 | just an idea to unify some lines |
binaries/data/mods/public/shaders/glsl/water_high.fs | ||
---|---|---|
272 | Why is this removed? |
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/differential/1615/display/redirect
Will test and commit after, this is a good idea
binaries/data/mods/public/shaders/glsl/water_high.fs | ||
---|---|---|
272 | ok so it's merged with the same code below. LGTM I suppose. |
@Angen How is this going, my friend? Is there a good solution released? I can test it for you.
Vladislav told he will look into his older patch, I tried to but cannot solve it, unless we remove something but it might lower performance.
@Angen If you can launch this patch that may degrade performance, let me test it. I want to test this patch to help you.
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/288/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/803/display/redirect