work on fix to weird issues
This commit is contained in:
parent
03556d15e8
commit
a2476a39a6
@ -26,10 +26,6 @@ draw_subwindow_texture_debug :: (state: *GR.Subwindow_State, r: GR.Rect, data: *
|
|||||||
#scope_export
|
#scope_export
|
||||||
|
|
||||||
draw_texture_debug :: () {
|
draw_texture_debug :: () {
|
||||||
uiTex := Ui_Texture.{gPipelines.plane.bind.images[0]};
|
|
||||||
set_shader_for_images(*uiTex);
|
|
||||||
immediate_quad(.{0, 0}, .{0 + 500, 0}, .{0 + 500, 0 + 500}, .{0, 0 + 500});
|
|
||||||
set_shader_for_color();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
toggle_texdebug :: () {
|
toggle_texdebug :: () {
|
||||||
|
|||||||
@ -158,7 +158,12 @@ frame :: () {
|
|||||||
draw_editor();
|
draw_editor();
|
||||||
if !in_editor_view then game_draw();
|
if !in_editor_view then game_draw();
|
||||||
|
|
||||||
draw_texture_debug();
|
|
||||||
|
uiTex := Ui_Texture.{gPipelines.plane.bind.images[0]};
|
||||||
|
set_shader_for_images(*uiTex);
|
||||||
|
r := GR.Rect.{0,0,500,500};
|
||||||
|
immediate_quad(.{r.x, r.y}, .{r.x + r.w, r.y}, .{r.x + r.w, r.y + r.h}, .{r.x, r.y + r.h});
|
||||||
|
set_shader_for_color();
|
||||||
|
|
||||||
ui_pass();
|
ui_pass();
|
||||||
sg_end_pass();
|
sg_end_pass();
|
||||||
|
|||||||
@ -292,10 +292,15 @@ create_plane_pipeline_reflection_image :: (binding: *sg_bindings) {
|
|||||||
height = h,
|
height = h,
|
||||||
pixel_format = .RGBA8,
|
pixel_format = .RGBA8,
|
||||||
render_target = true,
|
render_target = true,
|
||||||
sample_count = 1,
|
};
|
||||||
|
depth_desc := sg_image_desc.{
|
||||||
|
width = w,
|
||||||
|
height = h,
|
||||||
|
pixel_format = .DEPTH,
|
||||||
|
render_target = true,
|
||||||
};
|
};
|
||||||
binding.images[0] = sg_make_image(*img_desc);
|
binding.images[0] = sg_make_image(*img_desc);
|
||||||
binding.images[1] = sg_make_image(*img_desc);
|
binding.images[1] = sg_make_image(*depth_desc);
|
||||||
}
|
}
|
||||||
|
|
||||||
create_plane_pipeline :: () {
|
create_plane_pipeline :: () {
|
||||||
@ -310,6 +315,7 @@ create_plane_pipeline :: () {
|
|||||||
pipeline.depth = .{
|
pipeline.depth = .{
|
||||||
write_enabled = true,
|
write_enabled = true,
|
||||||
compare = .LESS_EQUAL,
|
compare = .LESS_EQUAL,
|
||||||
|
pixel_format = .DEPTH,
|
||||||
};
|
};
|
||||||
|
|
||||||
color_state := sg_color_target_state.{
|
color_state := sg_color_target_state.{
|
||||||
|
|||||||
@ -141,7 +141,6 @@ set_shader_for_color :: (enable_blend := false) {
|
|||||||
|
|
||||||
|
|
||||||
set_shader_for_images :: (texture: *Ui_Texture) {
|
set_shader_for_images :: (texture: *Ui_Texture) {
|
||||||
print("Setting shader for images!!!\n");
|
|
||||||
arb_tri_command_add(.{
|
arb_tri_command_add(.{
|
||||||
type = .SET_TEXTURE,
|
type = .SET_TEXTURE,
|
||||||
texture = texture
|
texture = texture
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user