[UI] UI common shaders to XeSL
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2022 Ben Vanik. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include "xesl.xesli"
|
||||
|
||||
xesl_push_constants_begin(b0, space0)
|
||||
// If the layout is changed, update the base offset in all guest output pixel
|
||||
// shaders!
|
||||
xesl_float2 xe_triangle_strip_rect_offset;
|
||||
// Can be negative.
|
||||
xesl_float2 xe_triangle_strip_rect_size;
|
||||
xesl_push_constants_end
|
||||
|
||||
xesl_entry
|
||||
xesl_entry_bindings_end
|
||||
xesl_input_vertex_id
|
||||
xesl_entry_signature_next
|
||||
xesl_output_position
|
||||
xesl_entry_signature_end
|
||||
xesl_Position =
|
||||
xesl_float4(
|
||||
xesl_push_constant(xe_triangle_strip_rect_offset) +
|
||||
xesl_float2((xesl_uint2(xesl_VertexID, xesl_VertexID) >>
|
||||
xesl_uint2(0u, 1u)) & 1u) *
|
||||
xesl_push_constant(xe_triangle_strip_rect_size),
|
||||
0.0, 1.0);
|
||||
xesl_entry_end
|
||||
Reference in New Issue
Block a user