mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 07:50:04 +00:00
Adding reflectivity declutter capability
This commit is contained in:
parent
e58b1f5b57
commit
77ba92ce7f
7 changed files with 130 additions and 6 deletions
|
|
@ -7,7 +7,10 @@ uniform sampler1D uTexture;
|
|||
uniform uint uDataMomentOffset;
|
||||
uniform float uDataMomentScale;
|
||||
|
||||
uniform bool uCFPEnabled;
|
||||
|
||||
flat in uint dataMoment;
|
||||
flat in uint cfpMoment;
|
||||
|
||||
layout (location = 0) out vec4 fragColor;
|
||||
|
||||
|
|
@ -15,5 +18,10 @@ void main()
|
|||
{
|
||||
float texCoord = float(dataMoment - uDataMomentOffset) / uDataMomentScale;
|
||||
|
||||
if (uCFPEnabled && cfpMoment > 8u)
|
||||
{
|
||||
texCoord = texCoord - float(cfpMoment - 8u) / 2.0f;
|
||||
}
|
||||
|
||||
fragColor = texture(uTexture, texCoord);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,11 +8,13 @@
|
|||
|
||||
layout (location = 0) in vec2 aLatLong;
|
||||
layout (location = 1) in uint aDataMoment;
|
||||
layout (location = 2) in uint aCfpMoment;
|
||||
|
||||
uniform mat4 uMVPMatrix;
|
||||
uniform vec2 uMapScreenCoord;
|
||||
|
||||
flat out uint dataMoment;
|
||||
flat out uint cfpMoment;
|
||||
|
||||
vec2 latLngToScreenCoordinate(in vec2 latLng)
|
||||
{
|
||||
|
|
@ -27,6 +29,7 @@ void main()
|
|||
{
|
||||
// Pass the coded data moment to the fragment shader
|
||||
dataMoment = aDataMoment;
|
||||
cfpMoment = aCfpMoment;
|
||||
|
||||
vec2 p = latLngToScreenCoordinate(aLatLong) - uMapScreenCoord;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue