def render( self, renderer, camera, renderChildren ): node = self.node # first render the node to the surface self.surface_renderer.renderNodeToSurface( padding = 0.2 ) # blur the bitmap blurred_image = gaussian_blur( self.surface_renderer.surface.bitmapPixels, self.sigma, self.kernel_size, self.method ) # render the blurred image self.bitmap_view = renderBitmap( blurred_image, self.surface_renderer.camera, camera, renderer )
def render(self, renderer, camera, renderChildren): node = self.node # first render the node to the surface self.surface_renderer.renderNodeToSurface(padding=0.2) # blur the bitmap blurred_image = gaussian_blur( self.surface_renderer.surface.bitmapPixels, self.sigma, self.kernel_size, self.method) # render the blurred image self.bitmap_view = renderBitmap(blurred_image, self.surface_renderer.camera, camera, renderer)
def render( self, renderer, camera, renderChildren ): node = self.node # first render the node to the surface self.surface_renderer.renderNodeToSurface( padding = 0.2 ) # get the alpha channel and set all colors to alpha to make it grey pixels = self.surface_renderer.surface.bitmapPixels #pixels[...,0:3] = self.shadow_colour[0:3] pixels[...,3] *= self.shadow_colour[3] / 255.0 # blur it blurred_image = gaussian_blur( pixels, self.sigma, self.kernel_size, self.method ) # render the node on top of it self.node_render_func( renderer, camera, renderChildren ) # render the blurred image self.bitmap_view = renderBitmap( blurred_image, self.surface_renderer.camera, camera, renderer, scale = self.scale, offset = self.offset )