Fix tests
This commit is contained in:
@@ -7,8 +7,8 @@ let project = new Project("test");
|
||||
project.add_project("../../");
|
||||
project.add_tsfiles("sources");
|
||||
project.add_tsfiles("../../sources/ts/iron");
|
||||
project.add_shaders("../../shaders/draw/*.glsl");
|
||||
project.add_shaders("shaders/*.glsl");
|
||||
project.add_shaders("../../shaders/draw/*.kong");
|
||||
project.add_shaders("shaders/*.kong");
|
||||
project.add_assets("assets/*", { destination: "data/{name}" });
|
||||
|
||||
return project;
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
#version 450
|
||||
|
||||
in vec2 tex_coord;
|
||||
|
||||
out vec4 frag_color;
|
||||
|
||||
uniform sampler2D my_texture;
|
||||
|
||||
void main() {
|
||||
frag_color = texture(my_texture, tex_coord);
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
|
||||
#[set(everything)]
|
||||
const my_texture: tex2d;
|
||||
|
||||
#[set(everything)]
|
||||
const my_texture_sampler: sampler;
|
||||
|
||||
#[set(everything)]
|
||||
const constants: {
|
||||
WVP: float4x4;
|
||||
};
|
||||
|
||||
struct vert_in {
|
||||
pos: float4;
|
||||
tex: float2;
|
||||
}
|
||||
|
||||
struct vert_out {
|
||||
pos: float4;
|
||||
tex: float2;
|
||||
}
|
||||
|
||||
fun mesh_vert(input: vert_in): vert_out {
|
||||
var output: vert_out;
|
||||
output.tex = input.tex;
|
||||
output.pos = constants.WVP * float4(input.pos.xyz, 1.0);
|
||||
return output;
|
||||
}
|
||||
|
||||
fun mesh_frag(input: vert_out): float4 {
|
||||
return sample(my_texture, my_texture_sampler, input.tex);
|
||||
}
|
||||
|
||||
#[pipe]
|
||||
struct pipe {
|
||||
vertex = mesh_vert;
|
||||
fragment = mesh_frag;
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
#version 450
|
||||
|
||||
in vec4 pos;
|
||||
in vec2 tex;
|
||||
|
||||
out vec2 tex_coord;
|
||||
|
||||
uniform mat4 WVP;
|
||||
|
||||
void main() {
|
||||
tex_coord = tex;
|
||||
gl_Position = WVP * vec4(pos.xyz, 1.0);
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
// ../../../make --graphics vulkan --run
|
||||
// ../../make --run
|
||||
|
||||
function main() {
|
||||
let ops: iron_window_options_t = {
|
||||
@@ -10,7 +10,8 @@ function main() {
|
||||
features: window_features_t.RESIZABLE | window_features_t.MINIMIZABLE | window_features_t.MAXIMIZABLE,
|
||||
mode: window_mode_t.WINDOWED,
|
||||
frequency: 60,
|
||||
vsync: true
|
||||
vsync: true,
|
||||
use_depth: false
|
||||
};
|
||||
sys_start(ops);
|
||||
sys_init();
|
||||
@@ -77,8 +78,8 @@ function ready() {
|
||||
contexts: [
|
||||
{
|
||||
name: "mesh",
|
||||
vertex_shader: "mesh.vert",
|
||||
fragment_shader: "mesh.frag",
|
||||
vertex_shader: "_mesh.vert",
|
||||
fragment_shader: "_mesh.frag",
|
||||
compare_mode: "less",
|
||||
cull_mode: "clockwise",
|
||||
depth_write: true,
|
||||
|
||||
Reference in New Issue
Block a user