mirror of
https://github.com/italicsjenga/vello.git
synced 2025-01-09 20:31:29 +11:00
Address review comments
This commit is contained in:
parent
e2ed54361d
commit
abd238bff3
|
@ -208,7 +208,7 @@ impl VkInstance {
|
|||
None,
|
||||
)?;
|
||||
|
||||
let (_dbg_loader, _dbg_callbk) = if false {
|
||||
let (_dbg_loader, _dbg_callbk) = if cfg!(debug_assertions) {
|
||||
let dbg_info = vk::DebugUtilsMessengerCreateInfoEXT::builder()
|
||||
.message_severity(
|
||||
vk::DebugUtilsMessageSeverityFlagsEXT::ERROR
|
||||
|
@ -504,7 +504,7 @@ impl crate::Device for VkDevice {
|
|||
|
||||
/// This creates a pipeline that runs over the buffer.
|
||||
///
|
||||
/// The descriptor set layout is just some number of buffers (this will change).
|
||||
/// The descriptor set layout is just some number of storage buffers and storage images (this might change).
|
||||
unsafe fn create_simple_compute_pipeline(
|
||||
&self,
|
||||
code: &[u8],
|
||||
|
|
|
@ -63,11 +63,11 @@ void main() {
|
|||
SegChunk seg_chunk = SegChunk_read(seg_chunk_ref);
|
||||
for (int i = 0; i < seg_chunk.n; i++) {
|
||||
Segment seg = Segment_read(SegmentRef(seg_chunk_ref.offset + SegChunk_size + Segment_size * i));
|
||||
vec2 line_vec = seg.end - seg.start;
|
||||
vec2 dpos = xy + vec2(0.5, 0.5) - seg.start;
|
||||
float t = clamp(dot(line_vec, dpos) / dot(line_vec, line_vec), 0.0, 1.0);
|
||||
df = min(df, length(line_vec * t - dpos));
|
||||
}
|
||||
vec2 line_vec = seg.end - seg.start;
|
||||
vec2 dpos = xy + vec2(0.5, 0.5) - seg.start;
|
||||
float t = clamp(dot(line_vec, dpos) / dot(line_vec, line_vec), 0.0, 1.0);
|
||||
df = min(df, length(line_vec * t - dpos));
|
||||
}
|
||||
seg_chunk_ref = seg_chunk.next;
|
||||
} while (seg_chunk_ref.offset != 0);
|
||||
fg_rgba = unpackUnorm4x8(stroke.rgba_color).wzyx;
|
||||
|
|
Loading…
Reference in a new issue