Translucent cubes + light with ofGLProgrammableRenderer

Hi there, does anyone know how I could achieve an effect that looks like this using ofGLProgrammableRenderer?

I have a spotlight pointing at the cubes, and they have an alpha value of 100. When I run this code using OF 8.4 with the default renderer it works like in the photo. However when I switch to the much faster ofGLProgrammableRenderer, I can’t seem to figure out how to get this effect. I’ve used the latest nightly build, which allows me to use the ofLight class (so light is working), but I can’t achieve the translucent effect seen here (here I have depth test enabled) and I can’t get the cubes to be blue unless I change the color of the light (rather than the color of the cubes).

Thanks!

can you post come code? changing the diffuse color of the material should change the color of the objects both with old opengl lights or the programmable renderer

I could have sworn I tried that, but yep diffuse color made my cubes blue. Ok, how how do I make them translucent like above? turning on alpha blending looks bad, and depth test doesn’t seem to work like it did in vanilla 8.4?

//--------------------------------------------------------------
void ofApp::setup(){

#ifdef TARGET_OPENGLES
shader.load("shadersES2/shader");
#else
if(ofIsGLProgrammableRenderer()){
    shader.load("shadersGL3/shader");
}else{
    shader.load("shadersGL2/shader");
}
#endif
//    ofSetVerticalSync(true);
ofSetFrameRate(60);
ofBackground(150, 150, 150);
//    ofEnableAlphaBlending();
ofEnableDepthTest();
ofEnableLighting();


int planeWidth = 1000;
int planeHeight = 1000;
int planeColums = 70;
int planeRows = 70;
plane.set(planeWidth, planeHeight, planeColums, planeRows, OF_PRIMITIVE_TRIANGLES);
plane.rotate(90, 1, 0, 0);
verts = plane.getMesh().getVertices();

light.setSpecularColor(ofColor(255, 255, 255.f));
light.setDiffuseColor( ofColor(255, 255, 255.f));
light.setSpotlight();
ofSetSmoothLighting(true);

material.setDiffuseColor(ofColor(0,0,255,100));


}

//--------------------------------------------------------------
void ofApp::update(){
verts = plane.getMesh().getVertices();
}

//--------------------------------------------------------------
void ofApp::draw(){

//    ofSetColor(255, 255, 255);
ofDrawBitmapString(ofToString(ofGetFrameRate())+"fps", 10, 15);

cam.begin();
shader.begin();
plane.drawWireframe();
shader.end();

material.begin();
light.enable();
light.draw();
ofPushMatrix();
//    ofSetColor(0, 0, 255, 100);
ofRotate(90, 1, 0, 0);
    for (int i = 0; i < verts.size(); i++) {
        ofDrawBox(verts[i].x, verts[i].y, verts[i].z, 5);
        }
//    ofFill();
    ofPopMatrix();
    material.end();

light.disable();
cam.end();
}