Search found 35 matches

by visvaldas
18 Mar 2019, 20:34
Forum: General Development
Topic: Fog shader?
Replies: 17
Views: 1413

Re: Fog shader?

Newest version: https://gitlab.com/vrresto/openmw/tree/my-fog-shader
Note: shadows don't work yet.
by visvaldas
15 Mar 2019, 17:23
Forum: General Development
Topic: Fog shader?
Replies: 17
Views: 1413

Re: Fog shader?

Alright - problem solved!
If I multiply the fog amount with 1-gl_Fog.scale everything looks as intended.

Edit: I'm not sure though if that's the proper way to do it.
It would be best if some precprocessor define was set to indicate that no fog should be added, as in the case of the black base layer.
by visvaldas
15 Mar 2019, 16:22
Forum: General Development
Topic: Fog shader?
Replies: 17
Views: 1413

Re: Fog shader?

Hmm, I guess that means I need to multiply the fog color by the blend alpha.
I will try that.
by visvaldas
15 Mar 2019, 15:53
Forum: General Development
Topic: Fog shader?
Replies: 17
Views: 1413

Re: Fog shader?

OK, I'm running into problems. For testing purposes I've set gl_FragData[0].xyz = vec3(0.5); in terrain_fragment.glsl. screenshot000.png The far terrain looks as expected, but the near terrain is off. It appears as if for the near terrain, the output of the fragment shader gets added to the framebuf...
by visvaldas
14 Mar 2019, 23:05
Forum: General Development
Topic: Fog shader?
Replies: 17
Views: 1413

Re: Fog shader?

In fact - yes ;)
by visvaldas
25 Jul 2018, 21:11
Forum: General Development
Topic: [patch] new fog shader
Replies: 126
Views: 45201

Re: [patch] new fog shader

Not sure what's going on there.
Can you post a screeshot with some distant terrain in view (e.g. the position of your screenshot, but facing red mountain)?
by visvaldas
21 Jul 2018, 13:28
Forum: Feature Requests and Suggestions
Topic: Water shaders, OpenMW vs MGEXE
Replies: 47
Views: 6254

Re: Water shaders, OpenMW vs MGEXE

OoOoO I had forgotten about that! Any progress with that? But yes, we'd have to come up with a more rigorous method than water type per cell. And preferably some kind of boundary condition between different types so the two different wave types would blend more naturally. I don't think you could si...
by visvaldas
20 Jul 2018, 18:07
Forum: Feature Requests and Suggestions
Topic: Water shaders, OpenMW vs MGEXE
Replies: 47
Views: 6254

Re: Water shaders, OpenMW vs MGEXE

Adding the foam would be great, but if the project ever gets to that stage it should somehow differentiate cells that are ocean water and cells that are river water. Difficult indeed. Probably will have to flag cells what type of water it contains or something similar. There are cells where river w...
by visvaldas
14 Jul 2018, 15:29
Forum: General Development
Topic: [patch] new fog shader
Replies: 126
Views: 45201

Re: [patch] new fog shader

Before this can be mainlined there should to be a way to easily switch between different fog implementations. This is a bit complicated because the fog shader depends on several components I had to modify to make it work. Among those are: lighting calculations: lighting.glsl, mwworld/weather.cpp sky...
by visvaldas
13 Jul 2018, 08:08
Forum: General
Topic: Shader License
Replies: 9
Views: 1334

Re: Shader License

It actually is the water shader from which I'm using code ;) Turns out, its just the fresnel and specular calculations. float fresnel_dielectric(vec3 Incoming, vec3 Normal, float eta) { float c = abs(dot(Incoming, Normal)); float g = eta * eta - 1.0 + c * c; float result; if(g > 0.0) { g = sqrt(g); ...