Skip to main content

All Questions

Tagged with
1 vote
1 answer
50 views

Unable to read depth from buffer when offscreen rendering

I'm trying to read the depth buffer from a frame buffer during offscreen rendering using the gpu.types.GPUFrameBuffer.read_depth() function from the gpu module. No ...
Sandroid's user avatar
2 votes
1 answer
93 views

Drawing a circle that faces towards the view with GPU/BGL?

Im trying to draw a circle using the GPU/BGL module that appears on a given certain 3D position (in my example, the cursor's location) and, when drawing, it points towards the current view. I'm using: ...
Ommadawn's user avatar
  • 668
4 votes
3 answers
415 views

How to draw a specific color with gpu shader

This is a bulid-in shader of gpu module to display a 2D rectangle in viewport, if you check the color of the rectangle via photoshop/MSpaint or use ...
X Y's user avatar
  • 6,023
0 votes
0 answers
36 views

Custom render pass

I'm looking to develop a post-render diagnostics overlay and am not quite sure how to go about it. I can add an opengl overlay to the viewport fine with the SpaceView3D draw_handler_add, but this of ...
Mr MinimalEffort's user avatar
1 vote
0 answers
214 views

Custom render engine - creating material previews with OpenGL?

I'm working on a custom render engine through a Python addon that uses the bgl module for most of its rendering. bl_use_preview ...
hayden0729's user avatar
0 votes
1 answer
324 views

How to force draw_handler_add?

I have a draw function inspired from this answer: ...
cak3_lover's user avatar
0 votes
0 answers
76 views

How to directly store Blender File Images Externally?

I'm using this answer to generate images from view port but is there a way to directly externally store/generate this image? and by that I mean NOT having to manually save them through Image Editor
cak3_lover's user avatar
2 votes
1 answer
538 views

Drawing to multiple render targets using the GPU module

Is there a way to draw to multiple render targets at once using the Blender's GPU module? I am looking for something similar to glDrawBuffers in OpenGL. Say, for example, my fragment shader looks like ...
QuantumCoderQC's user avatar
2 votes
0 answers
593 views

Dashed Lines GLSL Even Sizing

I'm working on a dashed line shader in a Blender add-on and my aim is to get all lines, regardless of length, to have the same sized dashes and dash spacing. GPU shaders are relatively new to me so I ...
Dan's user avatar
  • 83
0 votes
1 answer
766 views

How to get a list of faces with corresponding indices?

I am trying to get a list of faces that has each index of the 3 vertices that go with it. I thought about just doing it from scratch but they are kinda in random order. I am looking for a list that's ...
CloudlessStudio's user avatar
1 vote
0 answers
170 views

How can I make objects created with the GPU Module visible in the final render?

I used the code example for creating a triangle with custom shader from the official docs: ...
Squis's user avatar
  • 111
0 votes
0 answers
354 views

Rendering opengl image and then saving to a filepath

Need help solving how to render an image and then save to a filepath while in a loop. The following takes a photo and exports; however it isn't rendered. ...
Fano Fano's user avatar
3 votes
3 answers
1k views

How to make rounded corners for 2d rectangle with a custom shader?

Does anyone know how to make rounded corners for a 2d rectangle with a custom shader? ...
Karan's user avatar
  • 2,391
1 vote
0 answers
556 views

Drawing a rectangle using opengl in blender

I'm learning opengl in blender and successfully drew a triangle in 3d viewport. Now I'm trying to draw a rectangle using Element Object. Here is what I've tried. But it draws nothing. ...
Me BMan's user avatar
  • 175
4 votes
2 answers
2k views

Fastest way copying from bgl.Buffer() to numpy array

I have some rendered or processed pixel data in a bgl.Buffer() object and need it in a numpy array but that proccess seems to take very long. Here is what I have tried so far: ...
Gottfried Hofmann's user avatar

15 30 50 per page
1
2 3 4 5 6