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$
4
  • 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
    Commented Nov 10, 2014 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
    Commented Nov 12, 2014 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
    Commented Nov 12, 2014 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
    Commented Feb 10, 2015 at 8:31

0

You must log in to answer this question.

Browse other questions tagged .