screen space pattern failed, needs screen space uv coordinate on CompDraw shader
This commit is contained in:
@@ -299,9 +299,11 @@
|
||||
<node height="30" justify="center" margin="0 0 5 0">
|
||||
<text text="Blend"/>
|
||||
</node>
|
||||
<!--
|
||||
<node height="30" justify="center" margin="0 0 5 0">
|
||||
<text text="Projection"/>
|
||||
</node>
|
||||
-->
|
||||
<node height="20" justify="center">
|
||||
<text text="Apply"/>
|
||||
</node>
|
||||
@@ -343,9 +345,11 @@
|
||||
<node height="30" width="100%" pad="1" dir="row" margin="0 0 5 0">
|
||||
<combobox id="pattern-blend-mode" width="100%" height="28" combo-list="Normal,-,Multiply,Subtract,Darken,Overlay,Color Dodge,Linear Burn,Hard Mix,-,Linear Height,Height"/>
|
||||
</node>
|
||||
<!--
|
||||
<node height="30" width="100%" pad="1" dir="row" margin="0 0 5 0">
|
||||
<combobox id="pattern-proj-mode" width="100%" height="28" combo-list="Cube,Screen"/>
|
||||
</node>
|
||||
-->
|
||||
<node align="center" dir="row">
|
||||
<checkbox id="pattern-eachsample" height="20" width="20"/>
|
||||
<text text="each sample"/>
|
||||
|
||||
@@ -28,6 +28,7 @@ uniform mediump int blend_mode;
|
||||
uniform mediump vec2 resolution;
|
||||
uniform bool lock;
|
||||
uniform bool mask;
|
||||
uniform bool draw_on_screen;
|
||||
|
||||
uniform bool use_dual;
|
||||
uniform sampler2D tex_dual;
|
||||
@@ -54,6 +55,7 @@ void main()
|
||||
|
||||
if (use_pattern)
|
||||
{
|
||||
//mediump vec2 uv2 = draw_on_screen ? gl_FragCoord.st / resolution : uv;
|
||||
mediump vec2 rscale = resolution / vec2(512.0);
|
||||
mediump float patt = texture(tex_pattern, uv * (0.5 / pattern_scale) * rscale + pattern_offset).r;
|
||||
if (pattern_invert)
|
||||
|
||||
Reference in New Issue
Block a user