Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/modes/shaders/paint_weight_frag.glsl
| Show First 20 Lines • Show All 89 Lines • ▼ Show 20 Lines | if (drawContours) { | ||||
| weight_color = grid + weight_color * (1 - grid.a); | weight_color = grid + weight_color * (1 - grid.a); | ||||
| } | } | ||||
| /* Zero weight alert color. Nonlinear blend to reduce impact. */ | /* Zero weight alert color. Nonlinear blend to reduce impact. */ | ||||
| color = mix(weight_color, colorVertexUnreferenced, alert * alert); | color = mix(weight_color, colorVertexUnreferenced, alert * alert); | ||||
| } | } | ||||
| #ifdef DRW_STATE_BLEND_ALPHA | |||||
| /* alpha blending mix */ | |||||
| fragColor = vec4(color.rgb, opacity); | |||||
| #else | |||||
| /* mix with 1.0 -> is like opacity when using multiply blend mode */ | /* mix with 1.0 -> is like opacity when using multiply blend mode */ | ||||
| fragColor = vec4(mix(vec3(1.0), color.rgb, opacity), 1.0); | fragColor = vec4(mix(vec3(1.0), color.rgb, opacity), 1.0); | ||||
| #endif | |||||
| } | } | ||||