mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-29 13:20:42 +00:00
rsx: Formatting and tidying changes
This commit is contained in:
parent
1d004f2788
commit
fac8bcc20c
@ -65,8 +65,8 @@ vec4 fetch_fog_value(const in uint mode)
|
||||
// Purely stochastic
|
||||
bool coverage_test_passes(const in vec4 _sample)
|
||||
{
|
||||
float random = _rand(gl_FragCoord);
|
||||
return (_sample.a > random);
|
||||
float random_val = _rand(gl_FragCoord);
|
||||
return (_sample.a > random_val);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -159,8 +159,8 @@ attribute_desc fetch_desc(const in int location)
|
||||
uvec2 attrib = texelFetch(vertex_layout_stream, location + int(layout_ptr_offset)).xy;
|
||||
#else
|
||||
// Data is packed into a ubo
|
||||
int block = (location >> 1);
|
||||
int sub_block = (location & 1) << 1;
|
||||
const int block = (location >> 1);
|
||||
const int sub_block = (location & 1) << 1;
|
||||
uvec2 attrib = uvec2(
|
||||
ref(input_attributes_blob[block], sub_block + 0),
|
||||
ref(input_attributes_blob[block], sub_block + 1));
|
||||
@ -180,8 +180,9 @@ attribute_desc fetch_desc(const in int location)
|
||||
|
||||
vec4 read_location(const in int location)
|
||||
{
|
||||
int vertex_id;
|
||||
attribute_desc desc = fetch_desc(location);
|
||||
int vertex_id = _gl_VertexID - int(vertex_base_index);
|
||||
|
||||
if (desc.frequency == 0)
|
||||
{
|
||||
vertex_id = 0;
|
||||
@ -193,7 +194,7 @@ vec4 read_location(const in int location)
|
||||
}
|
||||
else
|
||||
{
|
||||
vertex_id /= int(desc.frequency);
|
||||
vertex_id = (_gl_VertexID - int(vertex_base_index)) / int(desc.frequency);
|
||||
}
|
||||
|
||||
if (desc.is_volatile)
|
||||
|
@ -2328,7 +2328,7 @@ namespace rsx
|
||||
// Subpixel offset so that (X + bias) * scale will round correctly.
|
||||
// This is done to work around fdiv precision issues in some GPUs (NVIDIA)
|
||||
// We apply the simplification where (x + bias) * z = xz + zbias here.
|
||||
const auto subpixel_bias = 0.01f;
|
||||
constexpr auto subpixel_bias = 0.01f;
|
||||
current_fragment_program.texture_params[i].bias[0] += (subpixel_bias * current_fragment_program.texture_params[i].scale[0]);
|
||||
current_fragment_program.texture_params[i].bias[1] += (subpixel_bias * current_fragment_program.texture_params[i].scale[1]);
|
||||
current_fragment_program.texture_params[i].bias[2] += (subpixel_bias * current_fragment_program.texture_params[i].scale[2]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user