Implemented Fade In To and Fade Out From Black Scene Transitions #378
|
@ -0,0 +1,8 @@
|
|||
- VertexShader: 46580970
|
||||
FragmentShader: 50110174
|
||||
SubPass: UI
|
||||
Properties:
|
||||
data.color: {x: 0.5, y: 0, z: 0, w: 1}
|
||||
data.textureIndex: 0
|
||||
data.alpha: 0
|
||||
data.beta: {x: 1, y: 1, z: 1}
|
|
@ -0,0 +1,3 @@
|
|||
Name: UIMat_Black
|
||||
ID: 120016136
|
||||
Type: 7
|
|
@ -0,0 +1,49 @@
|
|||
#version 450
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
#extension GL_ARB_shading_language_420pack : enable
|
||||
#extension GL_EXT_nonuniform_qualifier : require
|
||||
|
||||
struct MatPropData
|
||||
{
|
||||
vec4 color;
|
||||
int textureIndex;
|
||||
float alpha;
|
||||
};
|
||||
|
||||
layout(location = 0) in struct
|
||||
{
|
||||
vec4 vertPos; // location 0
|
||||
vec2 uv; // location = 1
|
||||
vec4 normal; // location = 2
|
||||
|
||||
} In;
|
||||
|
||||
// material stuff
|
||||
layout(location = 3) flat in struct
|
||||
{
|
||||
int materialIndex;
|
||||
uint eid;
|
||||
uint lightLayerIndex;
|
||||
} In2;
|
||||
|
||||
layout (set = 0, binding = 1) uniform sampler2D textures[]; // for textures (global)
|
||||
layout (std430, set = 2, binding = 0) buffer MaterialProperties // For materials
|
||||
{
|
||||
MatPropData data[];
|
||||
} MatProp;
|
||||
|
||||
layout(location = 0) out vec4 fragColor;
|
||||
layout(location = 1) out uint outEntityID;
|
||||
|
||||
void main()
|
||||
{
|
||||
fragColor = MatProp.data[In2.materialIndex].color;
|
||||
if (fragColor.a < 0.01f)
|
||||
{
|
||||
discard;
|
||||
}
|
||||
fragColor.a = MatProp.data[In2.materialIndex].alpha;
|
||||
|
||||
// fragColor.a = 1.0f;
|
||||
outEntityID = In2.eid;
|
||||
}
|
Binary file not shown.
|
@ -0,0 +1,3 @@
|
|||
Name: UI_Black_FS
|
||||
ID: 50110174
|
||||
Type: 2
|
Loading…
Reference in New Issue