我正在用PyOpenGL做一个游戏,我想在玩家死的时候让光线变暗。我该怎么做呢? 我已经尝试了几个资源,比如Tweak the brightness/gamma of the whole scene in OpenGL和https://www.gamedev.net/forums/topic/535812-disable-opengl-lighting-completely-to-dark-scene/,但都没有成功。 #!/usr/local/bin/python3
import pygame
from pygame.locals import *
from OpenGL.GL impo
在我的项目中,我添加了几个模型和其他几何对象,我可以移动相机在场景中扫描,但当我添加灯光时,如下图所示,模型没有显示出来。我应该如何添加适当的灯光来很好地适应场景中的模型。
var ambientLight = new THREE.AmbientLight(0x222222);
scene.add(ambientLight);
// add directional light source
var directionalLight = new THREE.DirectionalLight(0xffffff,2);
directionalLight.position.set(1, 1, 1).