Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Bug Reports / DBPro/Dark Shader problem with "set effect constant vector element" command

Author
Message
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 22nd Nov 2011 17:16 Edited at: 22nd Nov 2011 17:21
I get a compilation error whenever I try to use the set effect constant vector element and certain other Dark Shader commands.

Here's some typical code put together from the Dark Shader Export All option and the Dark Shader Help file for Passing Lights To a Shader:



Edit I might be doing something silly but I can't see it. I get the same error using U6.3, U6.7 and U7.7. Perhaps there's a file missing on my system?

Here's the compiler output window:

Attachments

Login to view attachments
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 22nd Nov 2011 20:13
DLL Export Viewer show the function name as ?SetEffectConstantVectorElement@@YAXKHH@Z in ShaderData.dll

The output from undname.exe show the function takes three parameters.

C:\>undname ?SetEffectConstantVectorElement@@YAXKHH@Z
Microsoft (R) C++ Name Undecorator
Copyright (C) Microsoft Corporation. All rights reserved.

Undecoration of :- "?SetEffectConstantVectorElement@@YAXKHH@Z"
is :- "void __cdecl SetEffectConstantVectorElement(unsigned long,int,int)"
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 23rd Nov 2011 18:48
Thanks. I'll look into that when I get home (away from my TGC stuff at the moment ). There should be four parameters, i.e. effect id (integer), constant name (string - a dword pointer?), vector id (integer), array element (integer). Seems like something is fouled up somewhere.

I get the same error with get object effect(1, -1). Both these commands are illustrated in the Dark Shader Help file.

I'm sure I had these working when Dark Shader first came out so perhaps an update has messed them up. Of course I can't now find any trace of my own working code if I ever had any.
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 23rd Nov 2011 20:37 Edited at: 23rd Nov 2011 20:52
Yes, something isn’t right here. If I remark the get object effect(1, -1) and change Set Effect Constant Vector Element 1, "LightColor", 0, 1 to Set Effect Constant Vector Element "LightColor", 0, 1 it will compile but give a `Get Object Effect` must be called before `Set Effect Constant Vector Element` error. DBPro doesn’t seem to recognize Get Object Effect.

Edit: Searching the forum I found out that Get Object Effect returns a value. Change get object effect(1, -1) to null = get object effect(1, -1).
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 24th Nov 2011 19:28
Ah! That rings a bell!

I vaguely recalled discussing a related matter with Paul Johnston ages ago but couldn't find the relevant emails before I made the original post - you've reminded me what the problem might be, thanks. I still don't see how four parameters suddenly become three - unless get object effect "finds" one of the parameters for you. I'll report back when I'm back with my machines and done some checking.

Thanks for your suggestions.
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 26th Nov 2011 00:21
Your welcome. Waiting to here your findings.

Login to post a reply

Server time is: 2024-04-19 02:24:38
Your offset time is: 2024-04-19 02:24:38