Created
January 19, 2021 15:16
-
-
Save pragma37/54fc99bef4a164104f8e3369f92c45ea to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Copyright (c) 2020 BlenderNPR and contributors. MIT license. | |
#include "Pipelines/NPR_Pipeline.glsl" | |
uniform int choose_color_0_texture_1_vertex_2 = 0; | |
uniform vec3 color; | |
uniform sampler2D color_texture; | |
uniform int color_texture_uv_index; | |
uniform int color_vertex_index; | |
void COMMON_PIXEL_SHADER(Surface S, inout PixelOutput PO) | |
{ | |
if(choose_color_0_texture_1_vertex_2 == 0) | |
{ | |
PO.color.rgb = color; | |
} | |
else if(choose_color_0_texture_1_vertex_2 == 1) | |
{ | |
PO.color = texture(color_texture, S.uv[color_texture_uv_index]); | |
} | |
else if(choose_color_0_texture_1_vertex_2 == 1) | |
{ | |
PO.color.rgb = S.color[color_vertex_index].rgb; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment