[BUG] Infix Parsing

Feature requests, bug reports and related discussion
Post Reply
9 posts • Page 1 of 1
MSUdom5
Posts: 159
Joined: Sun Jul 20, 2008 6:04 am
Location: Mississippi, USA
Contact:

[BUG] Infix Parsing

Post by MSUdom5 » Sat Nov 08, 2008 6:03 am

Indigo doesn't parse the following:

Code: Select all

def blend(vec3 tex1, vec3 tex2, real blendamt) vec3: (tex1*blendamt)+(tex2*(1.0-blendamt))

def eval(vec3 pos) vec3 : blend(sample2DTextureVec3(0,getTexCoords(0)), 
                                               sample2DTextureVec3(1,getTexCoords(0)),
                                               doti(sample2DTextureVec3(2, getTexCoords(0))))
Gives the message:

Fatal Error: IndigoDriverExcep: SceneLoaderExcep: Lexer: Failed to parse int Line 1, column 41 (In element 'shader', around line 66, column 13)

Onfame
Posts: 82
Joined: Wed Mar 12, 2008 12:32 pm

Post by Onfame » Sat Nov 08, 2008 7:18 am

This how it works:

def blend(vec3 tex1, vec3 tex2, real blendamt) vec3 : (tex1 * blendamt) + (tex2 * (1.0 - blendamt))

def eval(vec3 pos) vec3 : blend(sample2DTextureVec3(0,getTexCoords(0)),
sample2DTextureVec3(1,getTexCoords(0)),
doti(sample2DTextureVec3(2, getTexCoords(0))))
Attachments
thatstheresult.jpg
thatstheresult.jpg (78.32 KiB) Viewed 2069 times

MSUdom5
Posts: 159
Joined: Sun Jul 20, 2008 6:04 am
Location: Mississippi, USA
Contact:

Post by MSUdom5 » Sat Nov 08, 2008 8:06 am

Ah, so you have to have spaces in certain places? Hmm.. tisk tisk... :)

User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Post by CTZn » Sat Nov 08, 2008 8:10 am

You mean blank spaces matters, Onfame ?
obsolete asset

Onfame
Posts: 82
Joined: Wed Mar 12, 2008 12:32 pm

Post by Onfame » Sat Nov 08, 2008 8:20 am

YES allways the blank spaces are the bad :)

AND i changed this:
def blend(vec3 tex1, vec3 tex2, real blendamt) vec3:

to this

def blend(vec3 tex1, vec3 tex2, real blendamt) vec3 :

Ok i tested again the last is not necessary, but if you use +-*/ allways use Blanks.

User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Post by CTZn » Sat Nov 08, 2008 8:36 am

AND i changed this:
def blend(vec3 tex1, vec3 tex2, real blendamt) vec3:

to this

def blend(vec3 tex1, vec3 tex2, real blendamt) vec3 :
Do you want to drive me crazy :lol: ? Ah no I see it now :shock:

Many thanks for the hint, and nice "rojulero" mat !
obsolete asset

Onfame
Posts: 82
Joined: Wed Mar 12, 2008 12:32 pm

Post by Onfame » Sat Nov 08, 2008 8:42 am

Sorry my english isn´t that good, what exactly does "rojulero" mean :?:

User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Post by CTZn » Sat Nov 08, 2008 9:36 am

It's not english, it's a word :D !

I'm referring to the art of azulejo (azul => blue):

http://www.ribatejodigital.pt/RibatejoD ... 19C8B55%7D

Yours is likely, but red (rojo).

http://www.indigorenderer.com/joomla//f ... 4358#64358

eh, that's it :D
obsolete asset

Onfame
Posts: 82
Joined: Wed Mar 12, 2008 12:32 pm

Post by Onfame » Sat Nov 08, 2008 9:38 am

ah :) i just used the texture in the material Browser (from BbB):

http://www.indigorenderer.com/joomla/in ... Itemid=107

and combined it with other textures in the shader :)

Post Reply
9 posts • Page 1 of 1

Who is online

Users browsing this forum: No registered users and 42 guests