mirror of https://github.com/kivy/kivy.git
fix shader
This commit is contained in:
parent
075c8cd7b6
commit
50ef944c75
|
@ -19,11 +19,18 @@ from graphics_shader cimport Shader
|
|||
from graphics_context cimport GraphicContext
|
||||
from graphics_matrix cimport MatrixStack
|
||||
|
||||
|
||||
#tesselation of complex polygons
|
||||
from kivy.c_ext.p2t import CDT, Point
|
||||
|
||||
#TODO: write matrix transforms in c or cython
|
||||
from kivy.lib.transformations import matrix_multiply, identity_matrix, \
|
||||
rotation_matrix, translation_matrix, scale_matrix
|
||||
|
||||
|
||||
from kivy.logger import Logger
|
||||
|
||||
|
||||
cdef class Canvas
|
||||
cdef class GraphicContext
|
||||
cdef class GraphicInstruction
|
||||
|
@ -104,7 +111,7 @@ cdef class Canvas:
|
|||
|
||||
self.compile_init()
|
||||
|
||||
print "starting compile"
|
||||
Logger.debug("starting compile")
|
||||
|
||||
for i in xrange(len(self._batch)):
|
||||
item = self._batch[i]
|
||||
|
@ -135,7 +142,7 @@ cdef class Canvas:
|
|||
|
||||
|
||||
cdef compile_slice(self, str command, slice_start, slice_end):
|
||||
print "compiling slice:", slice_start, slice_end, command
|
||||
Logger.debug("compiling slice:", slice_start, slice_end, command)
|
||||
cdef VertexDataInstruction item
|
||||
cdef Buffer b = Buffer(sizeof(GLint))
|
||||
cdef int v, i
|
||||
|
|
|
@ -15,6 +15,5 @@ varying vec2 tex_coord2;
|
|||
uniform sampler2D texture0;
|
||||
|
||||
void main (void){
|
||||
float d = 1.0 -length(tex_coord2.xy);
|
||||
gl_FragColor = frag_color.xyza * texture2D(texture0, tex_coord0);
|
||||
gl_FragColor = frag_color * texture2D(texture0, tex_coord0);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue