jamieowen / glsl-blend Goto Github PK
View Code? Open in Web Editor NEWglsl photoshop blending modes. glslify formatted.
License: MIT License
glsl photoshop blending modes. glslify formatted.
License: MIT License
I think the substract
blend mode is a typo? Should be subtract
Subtract is not as same as LinearBurn
Subtract should be
float blendSubtract(float base, float blend) {
return max(base-blend, 0.0);
}
vec3 blendSubtract(vec3 base, vec3 blend) {
return max(base-blend, vec3(0.0));
}
vec3 blendSubtract(vec3 base, vec3 blend, float opacity) {
return (blendSubtract(base, blend) * opacity + base * (1.0 - opacity));
}
what is shader for base.a < 1 and overlay.a < 1
๐
Update: This aplies to the demo at http://jamieowen.github.io/glsl-blend
demo-three.min.js:13 THREE.WebGLShader: Shader couldn't compile. demo-three.min.js:13 THREE.WebGLShader: gl.getShaderInfoLog() fragment ERROR: 0:343: '(' : memory exhausted THREE.WebGLShader: gl.getShaderInfoLog() fragment ERROR: 0:343: '(' : memory exhausted
my browser:
Google Chrome 52.0.2743.116 (Official Build) m (32-bit) Revision 9115ecad1cae66fd5fe52bd9120af643384fd6f3-refs/branch-heads/2743@{#728} OS Windows Blink 537.36 (@9115ecad1cae66fd5fe52bd9120af643384fd6f3) JavaScript V8 5.2.361.49 Flash 22.0.0.209 User Agent Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36
Is it possible to use the Normal Blend.. but if the blend texture has parts that are alpha 0.0
show the basetexture below?
Just like putting a image that has transparent parts ON TOP of a base image. But the opacity of both images is 100%. so you are able to see both at the same time.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.