This repository has been archived on 2023-10-09. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
blender-archive/source/blender/draw/modes/shaders/paint_texture_vert.glsl
Jeroen Bakker d1349bd0c7 TexturePaint: Force Workbench Texture Color Mode
When in texture paint mode and in solid mode the object that is being
texture painted will be rendered by the workbench engine with textures.
All other objects would render the same. For other cases the texture paint
draw engine will still draw the texture.

The texture mode draw engine now only drawn the masks. The opacity
sliders influences the texture mask.

This change has been implemented conserably. In the future we need to
look into making this better, like adding support that every object
can be colored differently. Currently when rendering in the workbench
we can have up to 3 different color types active (what the user selected,
the fallback in case no materials have been configured and this one,
forcing textures)

Reviewed By: fclem, brecht

Differential Revision: https://developer.blender.org/D5190
2019-07-05 15:21:11 +02:00

18 lines
302 B
GLSL

in vec3 pos;
in vec2 mu; /* masking uv map */
out vec2 masking_uv_interp;
void main()
{
vec3 world_pos = point_object_to_world(pos);
gl_Position = point_world_to_ndc(world_pos);
masking_uv_interp = mu;
#ifdef USE_WORLD_CLIP_PLANES
world_clip_planes_calc_clip_distance(world_pos);
#endif
}