mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-13 15:01:49 +00:00
add emission gbuffer attachment
This commit is contained in:
parent
8a3306ed41
commit
5ec9f14021
12 changed files with 101 additions and 31 deletions
|
|
@ -15,6 +15,7 @@ out vec3 a_realnormal;
|
|||
out vec4 a_torchLight;
|
||||
out vec3 a_skyLight;
|
||||
out vec4 a_modelpos;
|
||||
out float a_emission;
|
||||
|
||||
uniform mat4 u_model;
|
||||
uniform mat4 u_proj;
|
||||
|
|
@ -51,6 +52,7 @@ void main() {
|
|||
mat4 viewmodel = u_view * u_model;
|
||||
a_distance = length(viewmodel * vec4(pos3d, 0.0));
|
||||
a_fog = calc_fog(length(viewmodel * vec4(pos3d * FOG_POS_SCALE, 0.0)) / 256.0);
|
||||
a_emission = v_normal.w;
|
||||
|
||||
vec4 viewmodelpos = u_view * a_modelpos;
|
||||
a_position = viewmodelpos.xyz;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue