mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'imbris/resize-tweaks' into 'master'
Resize related tweaks See merge request veloren/veloren!2448
This commit is contained in:
commit
a41c7a9a5b
@ -188,7 +188,9 @@ impl ShadowMap {
|
||||
let diag_two_size = u32::checked_next_power_of_two(diag_size)
|
||||
.filter(|&e| e <= max_texture_size)
|
||||
// Limit to max texture resolution rather than error.
|
||||
.unwrap_or(max_texture_size);
|
||||
.unwrap_or(max_texture_size)
|
||||
// Make sure we don't try to create a zero sized texture (divided by 4 below)
|
||||
.max(4);
|
||||
|
||||
let point_shadow_tex = wgpu::TextureDescriptor {
|
||||
label: None,
|
||||
|
@ -711,14 +711,9 @@ impl IcedRenderer {
|
||||
if intersection.is_valid() && intersection.size().map(|s| s > 0).reduce_and() {
|
||||
intersection
|
||||
} else {
|
||||
// Create a aabr with width 1 and height 1, technically
|
||||
// it would be more correct to do it with 0,0 but that's
|
||||
// a validation error in wgpu so enjoy your funky pixel
|
||||
// in the top left of your screen
|
||||
Aabr {
|
||||
min: Vec2::zero(),
|
||||
max: Vec2::one(),
|
||||
}
|
||||
// If the intersection is invalid or zero sized we don't need to process
|
||||
// the content primitive
|
||||
return;
|
||||
}
|
||||
};
|
||||
// Not expecting this case: new_scissor == current_scissor
|
||||
@ -737,8 +732,8 @@ impl IcedRenderer {
|
||||
self.draw_commands.push(DrawCommand::Scissor(new_scissor));
|
||||
|
||||
// TODO: support nested clips?
|
||||
// TODO: if last command is a clip changing back to the default replace it with
|
||||
// this
|
||||
// TODO: if previous command was a clip changing back to the default replace it
|
||||
// with this
|
||||
// TODO: cull primitives outside the current scissor
|
||||
|
||||
// Renderer child
|
||||
|
Loading…
Reference in New Issue
Block a user