aboutsummaryrefslogtreecommitdiff
path: root/game/src/Game/GameSession/billboard.gdshader
diff options
context:
space:
mode:
author Nemrav <>2024-11-17 22:51:35 +0100
committer Nemrav <>2024-11-17 22:51:35 +0100
commit0d1f42829b154c172608450e3689c56cbfacb4fd (patch)
treef5aa2633ea252ba2e602c88fea5d9b77a1b83283 /game/src/Game/GameSession/billboard.gdshader
parent54ddd94739d7efa3b7539d638edaf89b023ef903 (diff)
billboards placement
Diffstat (limited to 'game/src/Game/GameSession/billboard.gdshader')
-rw-r--r--game/src/Game/GameSession/billboard.gdshader4
1 files changed, 3 insertions, 1 deletions
diff --git a/game/src/Game/GameSession/billboard.gdshader b/game/src/Game/GameSession/billboard.gdshader
index e207ff9..e854bcf 100644
--- a/game/src/Game/GameSession/billboard.gdshader
+++ b/game/src/Game/GameSession/billboard.gdshader
@@ -5,6 +5,8 @@ uniform sampler2D billboards[255];
uniform int numframes[255];
uniform float sizes[255];
+uniform float height_add_factor = 0.3;
+
//COLOR/INSTANCE_CUSTOM is our custom data, used as follows:
// x=image index
// y=frame in image index
@@ -19,7 +21,7 @@ void vertex() {
vec3 vert_pos_world =
cam_right_worldspace * VERTEX.x * size +
cam_up_worldspace * VERTEX.y * size;
- VERTEX = vert_pos_world;
+ VERTEX = vert_pos_world + vec3(0,height_add_factor*size,0);
}
void fragment() {