wip
This commit is contained in:
parent
31fab3a37a
commit
0c274370c3
2 changed files with 10 additions and 8 deletions
|
@ -1,8 +1,7 @@
|
||||||
use std::{collections::HashMap, hash::BuildHasherDefault, sync::Arc};
|
use std::sync::Arc;
|
||||||
|
|
||||||
use ::util::ResultExt;
|
use ::util::ResultExt;
|
||||||
use anyhow::{Context, Result};
|
use anyhow::{Context, Result};
|
||||||
use collections::FxHasher;
|
|
||||||
// #[cfg(not(feature = "enable-renderdoc"))]
|
// #[cfg(not(feature = "enable-renderdoc"))]
|
||||||
// use windows::Win32::Graphics::DirectComposition::*;
|
// use windows::Win32::Graphics::DirectComposition::*;
|
||||||
use windows::{
|
use windows::{
|
||||||
|
|
|
@ -889,7 +889,15 @@ struct PathSprite {
|
||||||
|
|
||||||
struct PathVertexOutput {
|
struct PathVertexOutput {
|
||||||
float4 position: SV_Position;
|
float4 position: SV_Position;
|
||||||
|
nointerpolation uint sprite_id: TEXCOORD0;
|
||||||
|
nointerpolation float4 solid_color: COLOR0;
|
||||||
|
nointerpolation float4 color0: COLOR1;
|
||||||
|
nointerpolation float4 color1: COLOR2;
|
||||||
float4 clip_distance: SV_ClipDistance;
|
float4 clip_distance: SV_ClipDistance;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct PathFragmentInput {
|
||||||
|
float4 position: SV_Position;
|
||||||
nointerpolation uint sprite_id: TEXCOORD0;
|
nointerpolation uint sprite_id: TEXCOORD0;
|
||||||
nointerpolation float4 solid_color: COLOR0;
|
nointerpolation float4 solid_color: COLOR0;
|
||||||
nointerpolation float4 color0: COLOR1;
|
nointerpolation float4 color0: COLOR1;
|
||||||
|
@ -923,12 +931,7 @@ PathVertexOutput paths_vertex(PathVertexInput input) {
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
float4 paths_fragment(PathVertexOutput input): SV_Target {
|
float4 paths_fragment(PathFragmentInput input): SV_Target {
|
||||||
float4 zero = 0.0;
|
|
||||||
if (any(input.clip_distance < zero)) {
|
|
||||||
return zero;
|
|
||||||
}
|
|
||||||
|
|
||||||
PathSprite sprite = path_sprites[input.sprite_id];
|
PathSprite sprite = path_sprites[input.sprite_id];
|
||||||
Background background = sprite.color;
|
Background background = sprite.color;
|
||||||
float4 color = gradient_color(background, input.position.xy, sprite.bounds,
|
float4 color = gradient_color(background, input.position.xy, sprite.bounds,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue