Page Menu
Home
Search
Configure Global Search
Log In
Files
F13407271
InvisoPower.fsh
Chau (BlenderNavi)
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Authored By
Chau (BlenderNavi)
Aug 20 2022, 5:38 AM
Size
711 B
Subscribers
None
InvisoPower.fsh
View Options
//
// InvisoPower.fsh
//
// Created by 小小 on 24/6/2564.
//
// For change image black lines and white background become white lines and transparent background
uniform sampler2D uniform_texture;
varying vec2 textureCoordinate_noUniform;
varying vec4 color_noUniform;
void main() {
// ---- color pixel
vec4 color = color_noUniform*texture2D( uniform_texture, textureCoordinate_noUniform );
// from REC 709
float greyLevel = 0.212639*color.r + 0.715169*color.g + 0.072192*color.b;
float inverseGreyLevel = 1.0 - greyLevel;
float opacity = inverseGreyLevel*color.a;
gl_FragColor = vec4( inverseGreyLevel*opacity, inverseGreyLevel*opacity, inverseGreyLevel*opacity, opacity );
}
File Metadata
Details
Attached
Mime Type
text/x-c
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
0f/70/31726a46f67a347f881525990245
Attached To
T100515: 'Invert' Reference Empty - Image
Event Timeline
Log In to Comment