added exposure equations to avoid saturation; default exposure 1.0; added "exposure" keyword to global scene options in parser
git-svn-id: svn://anubis/fart/trunk@250 7f9b0f55-74a9-4bce-be96-3c2cd072584d
This commit is contained in:
1 parent
8fb2492e0a
commit
ef003f6100
6 files changed
+42
-17
No files matched your search
@@ -96,6 +96,12 @@ class DiffuseNode : public VectorNode
|
||||
DiffuseNode(refptr<Vector> vector) : VectorNode(vector) {}
|
||||
};
|
||||
|
||||
class ExposureNode : public NumberNode
|
||||
{
|
||||
public:
|
||||
ExposureNode(double d) : NumberNode(d) {}
|
||||
};
|
||||
|
||||
class HeightNode : public IntegerNode
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -46,6 +46,7 @@ color return COLOR;
|
||||
cyl return CYL;
|
||||
define return DEFINE;
|
||||
diffuse return DIFFUSE;
|
||||
exposure return EXPOSURE;
|
||||
height return HEIGHT;
|
||||
intersect return INTERSECT;
|
||||
light return LIGHT;
|
||||
|
||||
@@ -65,6 +65,7 @@ static refptr<Node> parsed_scene_node;
|
||||
%token CYL;
|
||||
%token DEFINE;
|
||||
%token DIFFUSE;
|
||||
%token EXPOSURE;
|
||||
%token HEIGHT;
|
||||
%token INTERSECT;
|
||||
%token LIGHT;
|
||||
@@ -295,6 +296,9 @@ options_item: WIDTH DEC_NUMBER {
|
||||
| MAXDEPTH DEC_NUMBER {
|
||||
$$ = new MaxDepthNode($2->getInteger());
|
||||
}
|
||||
| EXPOSURE number {
|
||||
$$ = new ExposureNode($2->getNumber());
|
||||
}
|
||||
;
|
||||
|
||||
plane: PLANE LCURLY plane_items RCURLY {
|
||||
|
||||
Reference in new issue
Block a user