Comments (2)
I don't have too much experience in shaders but I'm making some test on my own, i changed the HeightDrip.shader shader, i've replaced FlowDirection with a Flow map texture, with it's corresponding texture sampler.
sampler2D _MainTex;
sampler2D _FlowTex;
float4 _MainTex_ST;
float4 _MainTex_TexelSize;
float4 _FlowTex_TexelSize;
float2 getNormalizedFlowPoint(float2 uv)
{
return float2 (tex2D(_FlowTex, uv).rg * 2.0f - 1.0f);
}
...
float2 shiftZ = float2(getNormalizedFlowPoint(i.uv).x * _FlowTex_TexelSize.x, getNormalizedFlowPoint(i.uv).y * _FlowTex_TexelSize.y) * _ScaleFactor * _Viscosity * VITIATE_Z;
float2 shiftX = float2(_FlowTex_TexelSize.x * getNormalizedFlowPoint(i.uv).y, _FlowTex_TexelSize.y * getNormalizedFlowPoint(i.uv).x) * _ScaleFactor * _Viscosity * VITIATE_X;
float2 shiftx = -shiftX;
And i'ts working almost right, but i have a problem, when i specify a totally gray map RGB(0.5,0.5,0.5,1), even when the flow shouldn't move, it start drifting slightly to to upper right corner (in a test plane, at the UV coordinates 1,1)
if it's help in something, i could add a PR with my modifications to the 'Still not working completelly' HeightDrip shader, and the test Flowmaps textures to recreate the testing case.
from inkpainter.
very pleased to cooperate to make InkPainter better.
pull requests are always welcomed.
thank you!
from inkpainter.
Related Issues (20)
- wipe effect HOT 1
- Ink Painter Texturing Error when using ProBuilder HOT 1
- Adding InkCanvas component at runtime HOT 1
- Solution for Inkpainter with repeated texture. HOT 1
- 2D support HOT 1
- Fill status HOT 6
- Meshes imported from Blender does not work after SceneManager resets current scene. HOT 1
- Multiple Height Fluids
- Does not work when a texture is tiled.
- Paint size is affected by the size of the object being painted to.
- How to have dripping height paint on Collison?
- How to check what percentage of texture has been painted and how much remaining?
- StackOverflowException when painting on any non-Unity object using WorldPoint or Nearest Surface Point on MousePainter
- Asset won't work once project is built?
- NormalMap Paint didnt work with me on android
- It doesn't work in any ragdoll humanoid
- EXE program file is missing
- Creating an InkCanvas on runtime. HOT 1
- EXE Program Is Missing
- Samples don't work on unity 2022.3.16 with URP
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from inkpainter.