HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Author Topic: Shaders: Failed to insert named effect  (Read 1423 times)

PN-Dwight

  • General Accounts
  • *
  • Posts: 465
    • View Profile
    • Pirates' Nest
Shaders: Failed to insert named effect
« on: Nov 20, 13, 05:29:51 AM »

Alrighty, writing a simple testing shader resulted into this:

Code: [Select]
!ERROR!System:Failed to insert named effect [perm_light_dir_ambient_bump_32] into Names2Effects collection: name already exists.  (Does this effect have a unique name?)

Apparently, HE does not like custom shaders at all, but they appear to be working. Is this just an error message that I can safely ignore without breaking other things (especially when I want to change ambients)?

Thanks! :)

---

Attached is the shader:

Code: [Select]
shared float4x4 WorldViewProjectionMatrix;

struct VS_OUTPUT {
  float4 Pos   : POSITION;
  float4 Color : COLOR0;
};

struct VS_INPUT {
  float4 Pos : POSITION;
};

VS_OUTPUT vsmain(VS_INPUT In) {
  VS_OUTPUT Out = (VS_OUTPUT) 0;
  Out.Pos = mul(In.Pos, WorldViewProjectionMatrix);
  Out.Color = float4(1, 1, 1, 0.1);
  return Out;
}

float4 psmain(VS_OUTPUT In) : COLOR {
  return In.Color;
}

technique TestingPurposes < string SHADER_LEVEL = "2.0"; >
{
  pass pass0 {
    VertexShader = compile vs_2_0 vsmain();
    PixelShader = compile ps_2_0 psmain();
  }
}

Amanda_Brooks

  • General Accounts
  • *
  • Posts: 514
    • View Profile
    • Heroes and Villains
Re: Shaders: Failed to insert named effect
« Reply #1 on: Nov 21, 13, 01:24:54 AM »

Have you tested this out yet to see if the error stops the custom shader working correctly or not?
« Last Edit: Nov 21, 13, 01:34:59 AM by Amanda_Brooks »
Logged
"Heroes and Villains" - www.heroes-and-villains.com
Facebook: https://www.facebook.com/HeroesAndVillainsMMORPG
Twitter: @Plan_Z_Studios

PN-Dwight

  • General Accounts
  • *
  • Posts: 465
    • View Profile
    • Pirates' Nest
Re: Shaders: Failed to insert named effect
« Reply #2 on: Nov 21, 13, 02:27:43 PM »

Have you tested this out yet to see if the error stops the custom shader working correctly or not?

..., but they appear to be working. The shader does its simple job, but has this error message.

Amanda_Brooks

  • General Accounts
  • *
  • Posts: 514
    • View Profile
    • Heroes and Villains
Re: Shaders: Failed to insert named effect
« Reply #3 on: Nov 21, 13, 02:34:50 PM »

So maybe the error message is just a legacy thing that's left over from before they added custom shaders?
« Last Edit: Nov 21, 13, 03:27:06 PM by Amanda_Brooks »
Logged
"Heroes and Villains" - www.heroes-and-villains.com
Facebook: https://www.facebook.com/HeroesAndVillainsMMORPG
Twitter: @Plan_Z_Studios

PN-Dwight

  • General Accounts
  • *
  • Posts: 465
    • View Profile
    • Pirates' Nest
Re: Shaders: Failed to insert named effect
« Reply #4 on: Nov 21, 13, 03:03:54 PM »

Hence why I need the technical artist from Idea Fabrik (HEY BENNETT!!!) to check this out and see what might cause this :P

HE-BENNETT

  • HeroEngine
  • *****
  • Posts: 559
    • View Profile
Re: Shaders: Failed to insert named effect
« Reply #5 on: Nov 22, 13, 10:05:36 AM »

It's something we can take a look at.  As long as the custom shaders still work, it isn't a major concern at the moment and should be addressed during updates to the engine already in progress ;)

Logged

PN-Dwight

  • General Accounts
  • *
  • Posts: 465
    • View Profile
    • Pirates' Nest
Re: Shaders: Failed to insert named effect
« Reply #6 on: Nov 22, 13, 10:21:57 AM »

It's something we can take a look at.  As long as the custom shaders still work, it isn't a major concern at the moment and should be addressed during updates to the engine already in progress ;)

Bennett, I adore you! Good to see you covering some topics on the forums as well! Thanks for your reply and I will be nervously waiting for the next thing :)

P.S.: How far are you guys with rewriting the engine? ;)

HE-BENNETT

  • HeroEngine
  • *****
  • Posts: 559
    • View Profile
Re: Shaders: Failed to insert named effect
« Reply #7 on: Nov 22, 13, 01:42:08 PM »

It is extremely helpful when the collective knowledge of the developers on the forums serves to answer it's own questions here, but I do try and make an appearance if necessary.  The more time I have free to work on shiny things, the shinier they will be.

As I'm not directly involved with those tasks, I couldn't really give you a meaningful answer.  A lot of work proceeds on [redacted] which should lead to significant improvements in [redacted] in the next [redacted][nope]s.  In the words of Luke Smith, "Don't make the internet a promise, if you know you can't keep it."  Cooper might be able to tell you more.

I can suggest that the current work is laying the foundation for new and exciting features and considerable improvements to the extant functionality. 
Logged

keeperofstars

  • General Accounts
  • *
  • Posts: 998
    • View Profile
    • StarKeeper Online
Re: Shaders: Failed to insert named effect
« Reply #8 on: Nov 22, 13, 09:51:33 PM »

so will my beard turn grey before or after we hear of a ball park of all the shinny goodness. :)
Noting I would first have to grow one.
Logged
[img]http://screencast.com/t/x7btcSSyp3h0[\img]

Stadi_Thompson

  • General Accounts
  • *
  • Posts: 324
    • View Profile
Re: Shaders: Failed to insert named effect
« Reply #9 on: Nov 28, 13, 09:13:33 PM »

It is extremely helpful when the collective knowledge of the developers on the forums serves to answer it's own questions here, but I do try and make an appearance if necessary.  The more time I have free to work on shiny things, the shinier they will be.

As I'm not directly involved with those tasks, I couldn't really give you a meaningful answer.  A lot of work proceeds on [redacted] which should lead to significant improvements in [redacted] in the next [redacted][nope]s.  In the words of Luke Smith, "Don't make the internet a promise, if you know you can't keep it."  Cooper might be able to tell you more.

I can suggest that the current work is laying the foundation for new and exciting features and considerable improvements to the extant functionality.

More info please!!!!  :'(
Logged