Quantcast
Channel: beginners - openFrameworks
Viewing all articles
Browse latest Browse all 4929

Drawing in custom shader is half scaled

$
0
0

@Philippe_Charest wrote:

When drawing with a custom shader everything drawn in the shader is half scale... or drawing outside the shader everything id double scale....

If I call th of drawing function between shader calls the scale is what is expected!

cam.begin();
myCube.draw();  //This calls a custom shader and draws instanced cubes
ofSetColor(255, 0, 0);
ofDrawLine(0, 0, 0, myCube.ledSpacing * 15, 0, 0);
ofSetColor(0, 255, 0);
ofDrawLine(0, 0, 0, 0, myCube.ledSpacing, 0);
ofSetColor(0, 0, 255);
ofDrawLine(0, 0, 0, 0, 0, myCube.ledSpacing);
ofDrawArrow(ofVec3f(0, 0, 0), ofVec3f(0, 0, myCube.ledSpacing), 3);
cam.end();

In the screen grad the redline is suppose to be the same width as the cube....

file:///home/phil/Desktop/Screenshot%20from%202017-09-15%2021-54-23.png

Posts: 2

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4929

Trending Articles