3
$\begingroup$

Is there a way to give the OSL method

texture(string, float, float, ...)

a color input instead of the string which reads an image file?

Or is there any type of workaround?

$\endgroup$
  • 1
    $\begingroup$ The whole point of the texture() call is to read a color from an image texture, so the filename of that image texture needs to be specified. What are you trying to achieve, what would the color input be used for? $\endgroup$ – brecht Nov 10 '14 at 16:45
  • $\begingroup$ @brecht I am trying to get an Image Texture input into the script node(similar to sampler2D from GLSL). But I also need access to specific pixels of the texture, not just the one where the shader currently is. $\endgroup$ – boonto Nov 12 '14 at 13:19
  • $\begingroup$ That's not supported, the output of the Image Texture node is only a single color, not anything like a sampler2D. $\endgroup$ – brecht Nov 12 '14 at 21:29
  • $\begingroup$ @brecht Could you please copy you comments as an answer, then this one wouldn't appear no longer as unanswered. Thanks. $\endgroup$ – stacker Feb 10 '15 at 8:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.